-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from marvinpfoertner/version-number-from-git-tag
Improvements to the build process
- Loading branch information
Showing
8 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
from setuptools import setup | ||
|
||
# Cython Extensions | ||
ext_modules = [] | ||
|
||
try: | ||
# isort: off | ||
|
||
# This import must come after the setuptools import | ||
from Cython.Build import cythonize # isort: skip | ||
import scipy # isort: skip, pylint: disable=unused-import | ||
from Cython.Build import cythonize | ||
import scipy # pylint: disable=unused-import | ||
|
||
build_cython = True | ||
except ImportError: | ||
build_cython = False | ||
import os | ||
|
||
print("Not building Cython extensions") | ||
# isort: on | ||
|
||
# Extensions | ||
ext_modules = [] | ||
cython_available = True | ||
except ImportError: | ||
cython_available = False | ||
|
||
build_cython = cython_available and not ( | ||
"CHOLUPDATES_DISABLE_CYTHON_BUILD" in os.environ | ||
and os.environ["CHOLUPDATES_DISABLE_CYTHON_BUILD"] == "1" | ||
) | ||
|
||
if build_cython: | ||
ext_modules.extend( | ||
cythonize("src/cholupdates/rank_1/_seeger_impl_cython.pyx"), | ||
) | ||
else: | ||
print("Not building Cython extensions") | ||
|
||
setup( | ||
ext_modules=ext_modules, | ||
use_scm_version=True, # This is only here for compatibility reasons | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.c | ||
**/*.c | ||
|
||
_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters