Skip to content

[WIP] bpo-1294959: setup.py uses sys.platlibdir #18917

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

Closed
wants to merge 1 commit into from
Closed

[WIP] bpo-1294959: setup.py uses sys.platlibdir #18917

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 11, 2020

setup.py now uses sys.platlibdir to configure the compiler library
directories and to locate the termcap library.

https://bugs.python.org/issue1294959

setup.py now uses sys.platlibdir to configure the compiler library
directories and to locate the termcap library.
@vstinner
Copy link
Member Author

This is the last part of Fedora downstream patch which was part of the commit 8510f43 (PR #18381):
https://src.fedoraproject.org/rpms/python39/blob/master/f/00102-lib64.patch

@vstinner
Copy link
Member Author

I have questions.

  • Do we really need this change?
  • Who install libraries in /usr/local? Fedora packages should only install libraries in /usr, not /usr/local. Is it a convenient change for users who install modified or more recent libraries in /usr/local?
  • Why only termcap requires a special change? Is it because termcap library is installed in a subdirectory (/usr/lib/termcap, not "simply" /usr/lib)

@vstinner
Copy link
Member Author

@hroncok ran rpmdiff to compare the Fedora with the old downstream patches and with the new upstream commit 8510f43: compare the Python package with and without setup.py changes.

https://src.fedoraproject.org/rpms/python39/pull-request/31#comment-39392

In short, there is no difference. Moreover, @hroncok, @mcepl and me don't know the rationale of these setup.py changes.

I propose to drop them and wait until someone complains. If someone complains, we would know the rationale and so have a good reason to have these setup.py changes.

For readline: Fedora libreadline is already linked to libtinfo and so setup.py doesn't go up to self.compiler.find_library_file(self.lib_dirs + ['/usr/lib/termcap'], 'termcap') code path. This code is deadcode on Fedora.

For /usr/local/lib vs /usr/local/lib64: I'm not sure why /usr/local/lib is used in the first place. Fedora installs libraries in /usr, not in /usr/local. Maybe it's there for users who install dependencies without Fedora: by installed them manually in /usr/local. Again, since it's unclear how /usr/local is supposed to be used, I prefer to leave it unchanged.

I close this issue.

@vstinner vstinner closed this Mar 13, 2020
@vstinner vstinner deleted the setup_lib64 branch March 13, 2020 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants