nfjones / pipoe Goto Github PK
View Code? Open in Web Editor NEWGenerate python bitbake recipes!
License: MIT License
Generate python bitbake recipes!
License: MIT License
This is a great tool but unfortunately when trying to generate a set of recipes that includes requests
as a dependency, I encounter an error. This can be reproduced by running for the requests package on its own:
build@hostname:~$ pipoe --python python3 -p requests
Gathering info:
requests
[ERROR] Failed to gather requests (
win-inet-pton; sys_platform == "win32" and python_version == "2.7" and extra == 'socks'
^
Parse error at line 1, column 68: expected EOF. trail: [wsp]
)
Generating recipes:
PREFERRED_VERSIONS are available in: ./python3-versions.inc
It looks like the parser imported from pep508_parser
raises an exception when it encounters the requires_dist
value 'win-inet-pton; sys_platform == "win32" and python_version == "2.7" and extra == \'socks\''
.
Exception handling could be added around
d = parse_requires_dist(dep)
to ensure that the script completes and adds the other dependencies, I'm not familiar with pep508 to know whether the parser should be fixed as well.
when I specify the version I want, even if it is the latest one, pipoe always fail with (No sdist package can be found error)
I can run the command without specifying the version, but for libraries that depend on specific version is problematic.
For example, I can't install awsiotsdk, even without specifying the version, because it depends explicitly on awscrt v.0.14.0:
awsiotsdk
| awscrt==0.14.0
| [ERROR] Failed to gather awscrt (No sdist package can be found.)
It appears that the manifest is missing at least one file necessary to build
from the sdist for version 2019.11. You're in good company, about 5% of other
projects updated in the last year are also missing files.
+ /tmp/venv/bin/pip3 wheel --no-binary pipoe -w /tmp/ext pipoe==2019.11
Looking in indexes: http://10.10.0.139:9191/root/pypi/+simple/
Collecting pipoe==2019.11
Downloading http://10.10.0.139:9191/root/pypi/%2Bf/7c9/1c8440ed8390c/pipoe-2019.11.tar.gz (8.9 kB)
ERROR: Command errored out with exit status 1:
command: /tmp/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-d2cva9aw/pipoe/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-d2cva9aw/pipoe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-wheel-d2cva9aw/pipoe/pip-egg-info
cwd: /tmp/pip-wheel-d2cva9aw/pipoe/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-wheel-d2cva9aw/pipoe/setup.py", line 13, in <module>
with open("requirements.txt", "r") as infile:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I think project is dead but anyway:
Asume in python3-versions.inc should be always add latest package with latest version.
But it's always overwriten with latest package gattered with pipoe.
Is that by design?
I´m try to create the bb file for utils 1.0.1, https://pypi.org/project/utils/#modal-close
when run the command:
pipoe -p utils --python python3
The following info is shown:
Gathering info:
utils
Failed to translate license:
Please enter a valid license name:
I´m enter :
LGPLv3+
the following message is show:
[ERROR] Failed to gather utils (No sdist package can be found.)
Generating recipes:
PREFERRED_VERSIONS are available in: ./python3-versions.inc
(I'm Sorry if mistake any step)
In some (probably rare) cases it might come in handy to have some python modules available natively to generate and manipulate files at build time.
I've already implemented this on my fork and could easily create a new PR if this feature is desired.
See: https://github.com/ah-exp/pipoe/tree/native-recipes
If I run
$ pipoe -y python3 -p halo
Gathering info:
halo
| log-symbols
|-- colorama
| spinners
| termcolor
| six
Generating recipes:
python3-halo_0.0.31.bb
python3-log-symbols_0.0.14.bb
python3-colorama_0.4.4.bb
python3-spinners_0.0.24.bb
python3-termcolor_1.1.0.bb
python3-six_1.16.0.bb
PREFERRED_VERSIONS are available in: ./python3-versions.inc
pipoe generates a bunch of recipes - however I now have to manually put each of them into their own folder to be recognised by bitbake.
It would be nice if pipoe had an option to do this automatically!
I used poetry to export my requirements.txt file and it adds stuff to the package version like this:
flask==1.1.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
gevent==21.1.2; python_version >= "3.4" and python_full_version < "3.0.0" or python_version >= "3.4" and python_full_version >= "3.5.0"
greenlet==1.0.0; python_version >= "3.4" and python_full_version < "3.0.0" and platform_python_implementation == "CPython" or python_version >= "3.4" and python_full_version >= "3.5.0" and platform_python_implementation == "CPython"
gunicorn==20.0.4; python_version >= "3.4"
which makes the tool fail with fun errors like [ERROR] Failed to gather gevent (URL can't contain control characters. '/pypi/gevent/21.1.2; python_version >= "3.4" and python_full_version < "3.0.0" or python_version >= "3.4" and python_full_version >= "3.5.0"/json' (found at least ' '))
I would like to submit a PR to optionally not chase a package's dependencies.
My use case is that I'm using a Lock file that pins exact versions. We don't want multiple versions of packages generated.
Would such a change be supported?
Thank you.
Steps to reproduce:
$ pipoe -p typing-extensions
Gathering info:
typing-extensions
Failed to translate license:
Please enter a valid license name: Python Software Foundation License
[ERROR] Failed to gather typing-extensions ([Errno 2] No such file or directory: '/tmp/tmp2wy9_lkw/typing-extensions_4.5.0.tar.gz.d/typing_extensions-4.5.0/setup.py')
Generating recipes:
PREFERRED_VERSIONS are available in: ./python-versions.inc
typing-extensions is using pyproject.toml
https://github.com/python/typing_extensions/blob/main/pyproject.toml
Note how typing-extensions does not have a setup.py file
$ ls /tmp/tmphn_ez3lq/typing-extensions_4.5.0.tar.gz.d/typing_extensions-4.5.0
CHANGELOG.md LICENSE PKG-INFO pyproject.toml README.md src
Some packages provide "extra" packages. genpybb should be able to parse those and generate recipes for them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.