Skip to content

Commit

Permalink
Improve setup.py and drop the MANIFEST
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jan 5, 2023
1 parent 804a751 commit c9e5533
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
from ska_helpers.setup_helper import duplicate_package_info
from testr.setup_helper import cmdclass

# Special case here to allow `python setup.py --version` to run without
# requiring cython and numpy to be installed.
if "--version" in sys.argv[1:]:
cythonize = lambda arg: None # noqa
else:
from Cython.Build import cythonize

os_name = platform.system()
if os_name == "Windows":
compile_args = ["/EHs", "/D_CRT_SECURE_NO_DEPRECATE"]
Expand Down Expand Up @@ -44,6 +37,13 @@
duplicate_package_info(packages, name, namespace)
duplicate_package_info(package_dir, name, namespace)

# Special case here to allow `python setup.py --version` to run without
# requiring cython and numpy to be installed.
if "--version" in sys.argv[1:]:
ext_modules = None
else:
from Cython.Build import cythonize
ext_modules = cythonize(extensions, language_level="3")

setup(
name=name,
Expand All @@ -55,7 +55,7 @@
zip_safe=False,
packages=packages,
package_dir=package_dir,
ext_modules=cythonize(extensions, language_level="3"),
ext_modules=ext_modules,
tests_require=["pytest"],
cmdclass=cmdclass,
)

0 comments on commit c9e5533

Please sign in to comment.