setup.py: use absolute paths for pth files by sbraz · Pull Request #99 · xolox/python-coloredlogs · GitHub
Skip to content

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

Open
sbraz wants to merge 1 commit into
xolox:masterfrom
sbraz:pth
Open

setup.py: use absolute paths for pth files#99
sbraz wants to merge 1 commit into
xolox:masterfrom
sbraz:pth

Conversation

@sbraz

@sbraz sbraz commented Sep 26, 2020

Copy link
Copy Markdown

Hi,
On some systems (such as PyPy3 on Gentoo), distutils' data path is not sys.prefix, which means that we cannot rely on relative paths.

On some systems (such as PyPy3 on Gentoo), distutils' `data` path is not
`sys.prefix`, which means that we cannot rely on relative paths.
@coveralls

Copy link
Copy Markdown

1 similar comment
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+2.1%) to 93.659% when pulling 6f566c7 on sbraz:pth into 3935774 on xolox:master.

@sbraz

sbraz commented Sep 26, 2020

Copy link
Copy Markdown
Author

It looks like older versions of Python should be removed from Travis.

@blueyed

blueyed commented Sep 26, 2020

Copy link
Copy Markdown

On some systems (such as PyPy3 on Gentoo), distutils' data path is not sys.prefix, which means that we cannot rely on relative paths.

Can you elaborate on this?
I'm using something similar myself for pdb++: https://github.com/pdbpp/pdbpp/blob/dea1c519f842db114186c42a90c054d958370351/setup.py#L68-L73.

@sbraz

sbraz commented Sep 26, 2020

Copy link
Copy Markdown
Author

Hey @blueyed,
On Gentoo, we have this patch which makes distutils install data_files into /usr.

I don't really know why syconfig.py and distutils/command/install.py contain different INSTALL_SCHEMES (links are for CPython but PyPy3's are similar). Because of that, there is no guarantee that distutils's data path will be the same as sysconfig's.

@mgorny

mgorny commented Sep 27, 2020

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants