Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py: use absolute paths for pth files #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def find_pth_directory():
Determine the correct directory pathname for installing ``*.pth`` files.

To install a ``*.pth`` file using a source distribution archive (created
when ``python setup.py sdist`` is called) the relative directory pathname
``lib/pythonX.Y/site-packages`` needs to be passed to the ``data_files``
option to ``setup()``.
when ``python setup.py sdist`` is called) the directory pathname
``/usr/lib/pythonX.Y/site-packages`` needs to be passed to the ``data_files``
option of ``setup()``.

Unfortunately this breaks universal wheel archives (created when ``python
setup.py bdist_wheel --universal`` is called) because a specific Python
Expand All @@ -81,7 +81,7 @@ def find_pth_directory():
directory without hard coding its location.
"""
return ('/' if 'bdist_wheel' in sys.argv
else os.path.relpath(distutils.sysconfig.get_python_lib(), sys.prefix))
else distutils.sysconfig.get_python_lib())


setup(name='coloredlogs',
Expand Down