Skip to content

Commit

Permalink
setup: use relative paths for distutils (#51)
Browse files Browse the repository at this point in the history
I hope this fixes things...
  • Loading branch information
indygreg committed Oct 6, 2018
1 parent 8b4152d commit 194e5a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Other Actions Not Blocking Release
0.10.0 (not yet released)
=========================

* Use relative paths in setup.py to appease Python 3.7 (#51).
* Added CI for Python 3.7.

0.9.1 (released 2018-06-04)
Expand Down
5 changes: 5 additions & 0 deletions setup_zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ def get_c_extension(support_legacy=False, system_zstd=False, name='zstd',

libraries = ['zstd'] if system_zstd else []

# Python 3.7 doesn't like absolute paths. So normalize to relative.
sources = [os.path.relpath(p, root) for p in sources]
include_dirs = [os.path.relpath(p, root) for p in include_dirs]
depends = [os.path.relpath(p, root) for p in depends]

# TODO compile with optimizations.
return Extension(name, sources,
include_dirs=include_dirs,
Expand Down

0 comments on commit 194e5a2

Please sign in to comment.