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

py2deb no longer seems to handle python/debian versions #5

Open
brifordwylie opened this issue Feb 12, 2016 · 4 comments
Open

py2deb no longer seems to handle python/debian versions #5

brifordwylie opened this issue Feb 12, 2016 · 4 comments

Comments

@brifordwylie
Copy link

So for a long time my python project had a setup.py with specific version of python packages.

install_requires=[
    'flask==0.10.1',  # or whatever
    ...

Everything has worked fine for 6ish months and now suddenly I'm getting these errors:

2016-02-12 01:26:22 vagrant-ubuntu-trusty-64 py2deb.cli[6284] ERROR Caught an unhandled exception!
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/py2deb/cli.py", line 192, in main
    archives, relationships = converter.convert(arguments)
  File "/usr/local/lib/python2.7/dist-packages/py2deb/converter.py", line 524, in convert
    archive = package.convert()
  File "/usr/local/lib/python2.7/dist-packages/py2deb/package.py", line 383, in convert
    dependencies = [python_version()] + self.debian_dependencies
  File "/usr/local/lib/python2.7/dist-packages/cached_property.py", line 26, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/usr/local/lib/python2.7/dist-packages/py2deb/package.py", line 295, in debian_dependencies
    version = self.converter.transform_version(self, requirement.project_name, version)
  File "/usr/local/lib/python2.7/dist-packages/py2deb/converter.py", line 656, in transform_version
    """, name=normalized_name, count=num_matches, matches=matching_packages))
Exception: Expected requirement set to contain exactly one Python package whose name can be normalized to flask but encountered 0 packages instead! (matching packages: [])
@brifordwylie
Copy link
Author

$ pip list | grep py2deb
py2deb (0.24.2)

@xolox
Copy link
Member

xolox commented Mar 4, 2016

Hi Brian, thanks for the feedback and sorry for breaking your use case! The information you've provided isn't enough for me to reproduce the issue you describe (I've been trying for a while now :-) so I'm wondering:

  1. Is your Python project's source available somewhere for me to download so I can try to reproduce the issue based on the exact same set of Python packages?
  2. Alternatively (if point one isn't an option) can you run py2deb in verbose mode (py2deb -v ...), capture the output and post it here? If you don't want to share the log output publicly on GitHub you can also e-mail it to me directly.

Thanks in advance!

@itJunky
Copy link

itJunky commented Apr 16, 2018

Have a same error for many packages =(
Expected requirement set to contain exactly one Python package whose name can be normalized to pylint-plugin-utils but encountered 0 packages instead

# pip3 list| grep py2deb
py2deb (1.1)

My requirements.txt contain this:

pylint
django==1.11
pylint-django
python-social-auth
django-notifications-hq
stripe
python-dateutil
analytics-python
django-allauth
bcrypt
python-magic
pytz
psycopg2
Pillow
https://github.com/celery/django-celery/archive/master.zip
celery==3.1.25
billiard==3.3.0.23
kombu==3.0.37
amqp==1.4.9

For reproduce it, you can use my script:

#!/bin/bash

for dep in `cat requirements.txt`
do
	echo ''; echo ''
	echo $dep
	py2deb --name-prefix=python3 -r tmp/py2deb/ -- --no-deps $dep
	#exit 0
done

with -- -r requirements.txt work ok, but generate stupid unsolvable versions of dependencies.

trousev added a commit to trousev/py2deb that referenced this issue Apr 17, 2018
@brifordwylie
Copy link
Author

brifordwylie commented Oct 30, 2018

Seems like people are still running into this and I myself ran into it again today, there's some issue with the logic on this line inside package.py

 version = self.converter.transform_version(self, requirement.project_name, version)

I used the @trousev patch/hack and then everything worked fine

I'm reopening this and hopefully someone on the py2deb team can make a quick fix :)

@brifordwylie brifordwylie reopened this Oct 30, 2018
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

3 participants