diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e08fc1bd..b42f1e70 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: - name: Set Environment Variables uses: allenevans/set-env@v2.0.0 with: - NIMLITE_DIR: '_nimlite' + NIMLITE_DIR: 'tablite/_nimlite' NIM_PACKAGE_NAME: 'nimlite' TABLITE_PACKAGE_NAME: 'tablite' NIMC_FLAGS: '--app:lib --threads:on -d:release -d:danger' diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 9e2f19cc..6b72373e 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -35,7 +35,7 @@ jobs: - name: Set Environment Variables uses: allenevans/set-env@v2.0.0 with: - NIMLITE_DIR: '_nimlite' + NIMLITE_DIR: 'tablite/_nimlite' NIM_PACKAGE_NAME: 'nimlite' TABLITE_PACKAGE_NAME: 'tablite' NIMC_FLAGS: '--app:lib --threads:on -d:release -d:danger' @@ -51,16 +51,16 @@ jobs: nim c ${{ env.NIMC_FLAGS }} --out:${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.so ${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.nim # check if compiled successfully python -c "print(__import__('${{ env.TABLITE_PACKAGE_NAME }}.${{ env.NIM_PACKAGE_NAME }}').__file__)" - - name: MSVC - if: runner.os == 'Windows' - uses: TheMrMilchmann/setup-msvc-dev@v3 - with: - arch: x64 + # - name: MSVC + # if: runner.os == 'Windows' + # uses: TheMrMilchmann/setup-msvc-dev@v3 + # with: + # arch: x64 - name: Compile Debug & import (Windows) if: runner.os == 'Windows' run: | # compile the nimlite - nim c ${{ env.NIMC_FLAGS }} --tlsEmulation:off --passL:-static --out:${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.exe ${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.nim + nim c ${{ env.NIMC_FLAGS }} --tlsEmulation:off --passL:-static --out:${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.pyd ${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.nim - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/setup.py b/setup.py index ffe440d8..dc0d2a06 100644 --- a/setup.py +++ b/setup.py @@ -99,9 +99,9 @@ long_description=long_description, long_description_content_type="text/markdown", keywords=keywords, - packages=["tablite", "_nimlite"], + packages=["tablite", "tablite/_nimlite"], package_data={ - "_nimlite": ["**/*.so", "**/*.pyd", "**/*.nim"], # pack builds and nim source + "tablite": ["**/_nimlite/nimlite.so", "**/_nimlite/nimlite.pyd", "**/*.pyi"], # pack builds }, python_requires=">=3.8", include_package_data=True, diff --git a/tablite/_nimlite/__init__.py b/tablite/_nimlite/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/_nimlite/cli.nim b/tablite/_nimlite/cli.nim similarity index 100% rename from _nimlite/cli.nim rename to tablite/_nimlite/cli.nim diff --git a/_nimlite/csvparse.nim b/tablite/_nimlite/csvparse.nim similarity index 100% rename from _nimlite/csvparse.nim rename to tablite/_nimlite/csvparse.nim diff --git a/_nimlite/encfile.nim b/tablite/_nimlite/encfile.nim similarity index 100% rename from _nimlite/encfile.nim rename to tablite/_nimlite/encfile.nim diff --git a/_nimlite/infertypes.nim b/tablite/_nimlite/infertypes.nim similarity index 100% rename from _nimlite/infertypes.nim rename to tablite/_nimlite/infertypes.nim diff --git a/_nimlite/insertsort.nim b/tablite/_nimlite/insertsort.nim similarity index 100% rename from _nimlite/insertsort.nim rename to tablite/_nimlite/insertsort.nim diff --git a/tablite/_nimlite/nimlite b/tablite/_nimlite/nimlite new file mode 100755 index 00000000..999a8533 Binary files /dev/null and b/tablite/_nimlite/nimlite differ diff --git a/_nimlite/nimlite.nim b/tablite/_nimlite/nimlite.nim similarity index 100% rename from _nimlite/nimlite.nim rename to tablite/_nimlite/nimlite.nim diff --git a/_nimlite/nimlite.pyi b/tablite/_nimlite/nimlite.pyi similarity index 100% rename from _nimlite/nimlite.pyi rename to tablite/_nimlite/nimlite.pyi diff --git a/tablite/_nimlite/nimlite.so b/tablite/_nimlite/nimlite.so new file mode 100755 index 00000000..c663357e Binary files /dev/null and b/tablite/_nimlite/nimlite.so differ diff --git a/_nimlite/numpy.nim b/tablite/_nimlite/numpy.nim similarity index 100% rename from _nimlite/numpy.nim rename to tablite/_nimlite/numpy.nim diff --git a/_nimlite/paging.nim b/tablite/_nimlite/paging.nim similarity index 100% rename from _nimlite/paging.nim rename to tablite/_nimlite/paging.nim diff --git a/_nimlite/pickling.nim b/tablite/_nimlite/pickling.nim similarity index 100% rename from _nimlite/pickling.nim rename to tablite/_nimlite/pickling.nim diff --git a/_nimlite/pylayer.nim b/tablite/_nimlite/pylayer.nim similarity index 100% rename from _nimlite/pylayer.nim rename to tablite/_nimlite/pylayer.nim diff --git a/_nimlite/ranking.nim b/tablite/_nimlite/ranking.nim similarity index 100% rename from _nimlite/ranking.nim rename to tablite/_nimlite/ranking.nim diff --git a/_nimlite/table.nim b/tablite/_nimlite/table.nim similarity index 100% rename from _nimlite/table.nim rename to tablite/_nimlite/table.nim diff --git a/_nimlite/taskargs.nim b/tablite/_nimlite/taskargs.nim similarity index 100% rename from _nimlite/taskargs.nim rename to tablite/_nimlite/taskargs.nim diff --git a/_nimlite/textreader.nim b/tablite/_nimlite/textreader.nim similarity index 100% rename from _nimlite/textreader.nim rename to tablite/_nimlite/textreader.nim diff --git a/_nimlite/utils.nim b/tablite/_nimlite/utils.nim similarity index 100% rename from _nimlite/utils.nim rename to tablite/_nimlite/utils.nim diff --git a/tablite/nimlite.py b/tablite/nimlite.py index 6064819e..c85cc5fd 100644 --- a/tablite/nimlite.py +++ b/tablite/nimlite.py @@ -14,7 +14,7 @@ IS_WINDOWS = platform.system() == "Windows" USE_CLI_BACKEND = IS_WINDOWS -CLI_BACKEND_PATH = Path(__file__).parent.parent / f"_nimlite/nimlite{'.exe' if IS_WINDOWS else ''}" +CLI_BACKEND_PATH = Path(__file__).parent / f"_nimlite/nimlite{'.exe' if IS_WINDOWS else ''}" if not USE_CLI_BACKEND: paths = sys.argv[:] @@ -22,7 +22,7 @@ import nimporter nimporter.Nimporter.IGNORE_CACHE = True - import _nimlite.nimlite as nl + import tablite._nimlite.nimlite as nl sys.argv.clear() sys.argv.extend(paths) # importing nim module messes with pythons launch arguments!!! diff --git a/tablite/version.py b/tablite/version.py index fc189f32..b4eeb15d 100644 --- a/tablite/version.py +++ b/tablite/version.py @@ -1,3 +1,3 @@ -major, minor, patch = 2023, 8, "dev1" +major, minor, patch = 2023, 8, "dev2" __version_info__ = (major, minor, patch) __version__ = ".".join(str(i) for i in __version_info__)