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

update pkgconfig to version 1.5.1 #28883

Closed
dimpase opened this issue Dec 14, 2019 · 67 comments
Closed

update pkgconfig to version 1.5.1 #28883

dimpase opened this issue Dec 14, 2019 · 67 comments

Comments

@dimpase
Copy link
Member

dimpase commented Dec 14, 2019

the current version is buggy, as we found out on #27870

also, pkgconfig switched to https://python-poetry.org/ from setuptools, so we either get poetry installed too (which is a big task), or go Debian way and provide setup.py. That's what they do in their (not really "orig") tarball on

http://deb.debian.org/debian/pool/main/p/python-pkgconfig/

Cf. https://salsa.debian.org/python-team/modules/python-pkgconfig/tree/master

The pypi tarball has setup.py, so we can just use it.
tarball: https://files.pythonhosted.org/packages/6e/a9/ff67ef67217dfdf2aca847685fe789f82b931a6957a3deac861297585db6/pkgconfig-1.5.1.tar.gz

CC: @kiwifb @embray @tobihan @infinity0 @isuruf @mkoeppe

Component: packages: standard

Author: Dima Pasechnik

Branch: fb8f4e5

Reviewer: Isuru Fernando, Erik Bray, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/28883

@dimpase dimpase added this to the sage-9.1 milestone Dec 14, 2019
@dimpase

This comment has been minimized.

@dimpase
Copy link
Member Author

dimpase commented Dec 14, 2019

comment:2

I found adding setup.py into the "orig" tarball rather than into debian/patches rather unusual.

@dimpase

This comment has been minimized.

@dimpase
Copy link
Member Author

dimpase commented Dec 14, 2019

Commit: e5c91db

@dimpase
Copy link
Member Author

dimpase commented Dec 14, 2019

Author: Dima Pasechnik

@dimpase
Copy link
Member Author

dimpase commented Dec 14, 2019

Branch: u/dimpase/packages/pkgconfig151

@dimpase

This comment has been minimized.

@kiwifb
Copy link
Member

kiwifb commented Dec 14, 2019

comment:4

That poetry stuff is really a replacement for pip. And from where I see it, it can only fully replace superficially simple setup.py files. And it probably can generate such simple setup.py file, although I cannot see that in the Readme. And to be able to do what it does, it must be able to process complicated setup.py just fine, since it will install stuff that was never prepared for poetry if I am not mistaken.

Anyway that's outside of the scope of the ticket. But one more of this things to potentially deal with :(

@dimpase
Copy link
Member Author

dimpase commented Dec 14, 2019

comment:5

I guess poetry generates setup.py files as a part of its pypi deployment feature.

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 14, 2019

comment:6

[ A stupidity. Sorry for the noise ... ]

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 14, 2019

comment:7

Replying to @EmmanuelCharpentier:

[ A stupidity. Sorry for the noise ... ]

[ After re-checking the setup... ] This doesn't seem to be effective. I still get the systemwide pkg-config:

charpent@zen-book-flip:/usr/local/sage-9$ git status
Sur la branche t/28883/packages/pkgconfig151
Votre branche est à jour avec 'trac/u/dimpase/packages/pkgconfig151'.

rien à valider, la copie de travail est propre
charpent@zen-book-flip:/usr/local/sage-9$ ./sage -sh

Starting subshell with Sage environment variables set.  Don't forget
to exit when you are done.  Beware:
 * Do not do anything with other copies of Sage on your system.
 * Do not use this for installing Sage packages using "sage -i" or for
   running "make" at Sage's root directory.  These should be done
   outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/usr/local/sage-9
(sage-sh) charpent@zen-book-flip:sage-9$ command -v pkg-config
/usr/bin/pkg-config
(sage-sh) charpent@zen-book-flip:sage-9$ pkg-config --version
0.29
(sage-sh) charpent@zen-book-flip:sage-9$ exit
exit
Exited Sage subshell.

@dimpase
Copy link
Member Author

dimpase commented Dec 14, 2019

comment:8

this is a Python interface to pkg-config.
So you need to import pkgconfig in Sage's Python to see it in action.

@isuruf
Copy link
Member

isuruf commented Dec 15, 2019

Reviewer: Isuru Fernando

@vbraun
Copy link
Member

vbraun commented Dec 17, 2019

Changed branch from u/dimpase/packages/pkgconfig151 to e5c91db

@vbraun
Copy link
Member

vbraun commented Dec 21, 2019

Changed commit from e5c91db to none

@vbraun
Copy link
Member

vbraun commented Dec 21, 2019

comment:13

This breaks on OSX:

[sagelib-9.0.beta9] Traceback (most recent call last):
[sagelib-9.0.beta9]   File "setup.py", line 72, in <module>
[sagelib-9.0.beta9]     from module_list import ext_modules, library_order
[sagelib-9.0.beta9]   File "/Users/buildbot-sage/slave/sage_git/build/src/module_list.py", line 42, in <module>
[sagelib-9.0.beta9]     zlib_pc = pkgconfig.parse('zlib')
[sagelib-9.0.beta9]   File "/Users/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 248, in parse
[sagelib-9.0.beta9]     _raise_if_not_exists(package)
[sagelib-9.0.beta9]   File "/Users/buildbot-sage/slave/sage_git/build/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
[sagelib-9.0.beta9]     raise PackageNotFoundError(package)
[sagelib-9.0.beta9] pkgconfig.pkgconfig.PackageNotFoundError: zlib not found
[sagelib-9.0.beta9] ************************************************************************
[sagelib-9.0.beta9] Error building the Sage library
[sagelib-9.0.beta9] ************************************************************************

@vbraun vbraun reopened this Dec 21, 2019
@dimpase
Copy link
Member Author

dimpase commented Dec 21, 2019

comment:14

probably buildbot had a workaround for the buggy package?

@dimpase
Copy link
Member Author

dimpase commented Dec 21, 2019

comment:15

isn't the !Sage/Python environment of that buildbot broken?
One should have

sage: import pkgconfig
sage: pkgconfig.parse('zlib')
defaultdict(<class 'list'>, {'libraries': ['z']})

@dimpase
Copy link
Member Author

dimpase commented Dec 24, 2019

comment:43

Sage's Python has to dig up zlib.pc to read by pkgconfig.parse(), from somewhere.

By the way, I don't understand pkgconf in ./sage -sh -c 'pkgconf --cflags zlib ???

it should be pkg-config

I guess pkgconf is some "unofficial" name for pkg-config, used by Sage's pkgconf package, which installs pkg-config.

@isuruf
Copy link
Member

isuruf commented Dec 24, 2019

comment:44

pkgconf and pkg-config are two different programs both of which does the same thing. pkgconf has a pkg-config symlink as well. (Think of pkgconf as MPIR built with GMP compat and pkg-config as GMP.)

@dimpase
Copy link
Member Author

dimpase commented Dec 24, 2019

comment:45

So you were confused by Volker's pkgconf invocation --- sorry, I should have noticed it earlier. I bet ./sage -sh -c 'pkg-config --libs zlib has meaningful output with -lz in it.

@jhpalmieri
Copy link
Member

comment:46

Replying to @isuruf:

You probably have zlib installed from homebrew.

What do you get with pkg-config zlib --variable pcfiledir ?

/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15. Also

$ ./sage -sh -c 'pkg-config --libs zlib'
-lz

@isuruf
Copy link
Member

isuruf commented Dec 24, 2019

comment:47

What does pkg-config zlib --variable libdir give you?

@dimpase
Copy link
Member Author

dimpase commented Dec 24, 2019

comment:48

Replying to @jhpalmieri:

Replying to @isuruf:

You probably have zlib installed from homebrew.

What do you get with pkg-config zlib --variable pcfiledir ?

/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15. Also

$ ./sage -sh -c 'pkg-config --libs zlib'
-lz

so it appears that you use zlib provided by Homebrew, which does supply zlib.pc, so everything works as it should. (I don't know whether they install a real zlib, or just provide zlib.pc pointing to the MacOS native one, probably the former)

@jhpalmieri
Copy link
Member

comment:49

Replying to @isuruf:

What does pkg-config zlib --variable libdir give you?

/usr/lib

@kiwifb
Copy link
Member

kiwifb commented Dec 25, 2019

comment:50

For information on PEP517 and the whole poetry business of packaging https://blogs.gentoo.org/mgorny/2019/12/24/handling-pep-517-pyproject-toml-packages-in-gentoo/

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

809abd9added missing module name

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2019

Changed commit from 9d33b71 to 809abd9

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2019

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f74f554update pkgconfig to v1.5.1. See trac #28883
fb8f4e5allow absent zlib.pc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2019

Changed commit from 809abd9 to fb8f4e5

@dimpase
Copy link
Member Author

dimpase commented Dec 27, 2019

Changed reviewer from Isuru Fernando to Isuru Fernando, Erik Bray

@dimpase
Copy link
Member Author

dimpase commented Dec 27, 2019

comment:53

I've tried #28906 but it is ugly as hell, so not sure whether it should be getting in. So this is the minimal (rebased) fix.

@mkoeppe
Copy link
Member

mkoeppe commented Dec 28, 2019

Changed reviewer from Isuru Fernando, Erik Bray to Isuru Fernando, Erik Bray, Matthias Koeppe

@mkoeppe
Copy link
Member

mkoeppe commented Dec 28, 2019

comment:54

Looks good and works well on macOS Catalina - after fixing #28676.

@vbraun
Copy link
Member

vbraun commented Jan 5, 2020

Changed branch from u/dimpase/packages/pkgconfig151 to fb8f4e5

@mkoeppe
Copy link
Member

mkoeppe commented Jun 5, 2020

comment:57

Follow-up on the poetry issue at #29810

@mkoeppe
Copy link
Member

mkoeppe commented Jun 5, 2020

Changed commit from fb8f4e5 to none

@dimpase
Copy link
Member Author

dimpase commented Jun 12, 2020

comment:58

"...and other forms of boredom advertised as poetry."

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

No branches or pull requests

7 participants