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

Packages listed in extras_require not listed as dependencies in package. #139

Open
sjlongland opened this issue Aug 7, 2018 · 4 comments

Comments

@sjlongland
Copy link

Hi,
We've struck an issue with the pint package in that it needs an additional package funcsigs on Python 2.7. We use stdeb to build a Debian package for use in deployments but have found that now stdeb is producing a Debian package that misses this funcsigs package.

Reproducing using Docker (we use Docker within Bamboo CI to build upstream packages):

docker run --rm \
	       -v ${PWD}:/tmp/out \
	       -e BUILD_UID=$( id -u ) \
	       -e BUILD_GID=$( id -g ) \
	       debian:jessie bash -xec '
# Add backports
sed -ne "/jessie main$/ { s/jessie/jessie-backports/; p; }" \
	/etc/apt/sources.list >> /etc/apt/sources.list

# Install packages
apt-get update
apt-get install -y python-pip python-setuptools git \
	python-all dpkg-dev dh-python debhelper gosu

# Install stdeb
git clone --depth=1 https://github.com/astraw/stdeb.git /tmp/stdeb
cd /tmp/stdeb
python setup.py install

# Build pint
git clone --depth=1 https://github.com/hgrecco/pint.git /tmp/pint
cd /tmp/pint
chown -R ${BUILD_UID}:${BUILD_GID} .
gosu ${BUILD_UID}:${BUILD_GID} python setup.py \
	     --command-package=stdeb.command bdist_deb

# Clean up work directory
find deb_dist -mindepth 1 -maxdepth 1 -type d | xargs rm -fr

# Copy built packages
mv -v deb_dist/* /tmp/out/'

I get the following in the current working directory after running the above:

stuartl@vk4msl-ws /tmp/pint $ dpkg-deb --info python-pint_0.9~dev0-1_all.deb 
 new Debian package, version 2.0.
 size 103866 bytes: control archive=2790 bytes.
    1047 bytes,    29 lines      control              
    4847 bytes,    53 lines      md5sums              
     161 bytes,     9 lines   *  postinst             #!/bin/sh
     259 bytes,    14 lines   *  prerm                #!/bin/sh
 Package: python-pint
 Source: pint
 Version: 0.9~dev0-1
 Architecture: all
 Maintainer: Hernan E. Grecco <[email protected]>
 Installed-Size: 558
 Depends: python (>= 2.7), python (<< 2.8)
 Section: python
 Priority: optional
 Description: Physical quantities module
  Pint: makes units easy
…

Note that Depends lacks a reference to python-funcsigs (which is in backports).

@sjlongland
Copy link
Author

A work-around in this case is to do this:

    gosu ${BUILD_UID}:${BUILD_GID} \
        python setup.py \
            --command-package stdeb.command \
            sdist_dsc \
            --depends python-funcsigs \
            bdist_deb

@p1otr
Copy link
Contributor

p1otr commented Aug 7, 2018 via email

@sjlongland
Copy link
Author

I did it again this time preserving the work directory that stdeb creates…

RC=0 stuartl@rikishi /tmp/pint-0.9~dev0 $ cat Pint.egg-info/requires.txt 

[:python_version == "2.7"]
funcsigs

@p1otr
Copy link
Contributor

p1otr commented Aug 7, 2018 via email

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

No branches or pull requests

2 participants