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

debian package of numpy for debian wheezy with py2deb #15

Open
emilio-molina opened this issue Mar 9, 2018 · 3 comments
Open

debian package of numpy for debian wheezy with py2deb #15

emilio-molina opened this issue Mar 9, 2018 · 3 comments

Comments

@emilio-molina
Copy link

emilio-molina commented Mar 9, 2018

Hi, thanks for py2deb, it's exactly what I need now.

I'm trying to create a debian package of numpy for debian wheezy for the version v1.14.1 (the official debian package is an older version). However, I'm having these errors:

# py2deb -r /output_debs/ numpy
2018-03-09 16:44:28 4222eefebe82 pip_accel[21987] INFO Unpacking distribution(s) ..
2018-03-09 16:44:28 4222eefebe82 pip_accel[21987] INFO Executing command: pip install --download=/var/cache/pip-accel/sources --find-links=file:///var/cache/pip-accel/sources --no-binary=:all: --no-index --no-clean --build-directory=/tmp/pip-accel-build-dir-P1smGj --ignore-installed numpy
2018-03-09 16:44:28 4222eefebe82 pip.commands.install[21987] INFO Ignoring indexes: https://pypi.python.org/simple
2018-03-09 16:44:29 4222eefebe82 pip.req.req_set[21987] INFO Collecting numpy
2018-03-09 16:44:29 4222eefebe82 pip.download[21987] INFO File was already downloaded /var/cache/pip-accel/sources/numpy-1.14.1.zip
2018-03-09 16:44:29 4222eefebe82 pip.commands.install[21987] INFO Successfully downloaded numpy
2018-03-09 16:44:29 4222eefebe82 pip_accel[21987] INFO Finished unpacking 1 distribution in 0.84 seconds.
2018-03-09 16:44:29 4222eefebe82 pip_accel.bdist[21987] INFO Building numpy (1.14.1) binary distribution ..
2018-03-09 16:44:30 4222eefebe82 pip_accel.bdist[21987] WARNING Build of numpy (1.14.1) failed, falling back to alternative method ..
2018-03-09 16:44:30 4222eefebe82 pip_accel.bdist[21987] INFO Building numpy (1.14.1) binary distribution ..
2018-03-09 16:44:30 4222eefebe82 pip_accel.bdist[21987] WARNING Build of numpy (1.14.1) failed, checking for missing dependencies ..
2018-03-09 16:44:30 4222eefebe82 pip_accel.deps[21987] INFO Checking for known dependencies of numpy ..
2018-03-09 16:44:30 4222eefebe82 pip_accel.deps[21987] INFO No known dependencies... Maybe you have a suggestion?
2018-03-09 16:44:30 4222eefebe82 py2deb.cli[21987] ERROR Caught an unhandled exception!
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/py2deb/cli.py", line 200, in main
    archives, relationships = converter.convert(arguments)
  File "/usr/local/lib/python2.7/dist-packages/py2deb/converter.py", line 546, in convert
    archive = package.convert()
  File "/usr/local/lib/python2.7/dist-packages/py2deb/package.py", line 376, in convert
    virtualenv_compatible=False,
  File "/usr/local/lib/python2.7/dist-packages/pip_accel/bdist.py", line 437, in install_binary_dist
    for member, from_handle in members:
  File "/usr/local/lib/python2.7/dist-packages/py2deb/package.py", line 503, in transform_binary_dist
    for member, handle in self.converter.pip_accel.bdists.get_binary_dist(self.requirement):
  File "/usr/local/lib/python2.7/dist-packages/pip_accel/bdist.py", line 87, in get_binary_dist
    raw_file = self.build_binary_dist(requirement)
  File "/usr/local/lib/python2.7/dist-packages/pip_accel/bdist.py", line 217, in build_binary_dist
    return self.build_binary_dist_helper(requirement, ['bdist', '--formats=gztar'])
  File "/usr/local/lib/python2.7/dist-packages/pip_accel/bdist.py", line 282, in build_binary_dist_helper
    name=requirement.name, version=requirement.version)
BuildFailed: Failed to build numpy (1.14.1) binary distribution!

Please check the build output because it will probably provide a hint about what went wrong.

Build output:

Running from numpy source directory.
`setup.py bdist` is not supported
Add `--force` to your command to use it anyway if you must (unsupported).

Any advice?
Thanks.

@ddboline
Copy link

ddboline commented Jun 5, 2018

The setup.py file for numpy doesn't allow the bdist installation method, my solution is to patch setup.py (it requires modifying two lines), see: numpy/numpy#7632
The change to setup.py:
ddboline/numpy@c5435d0

@vidstige
Copy link

There seens to be a --force option. Can we use this somehow? Perhaps have a hueristic that py2deb passes --force if doing numpy? Perhaps this can be handled in a module for special tweaks for tricky/non-standard packages?

@mahmuuud
Copy link

mahmuuud commented Dec 9, 2021

The setup.py file for numpy doesn't allow the bdist installation method, my solution is to patch setup.py (it requires modifying two lines), see: numpy/numpy#7632
The change to setup.py:
ddboline/numpy@c5435d0

@ddboline Could you elaborate more how to tweak it, I am facing the same issue on production right now and I cannot get a debian package out of numpy....

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

4 participants