Comments (11)
Apparently in 2010 pip was garbage from an API perspective.
Not sure if it has changed.
https://groups.google.com/forum/m/#!topic/python-virtualenv/_VmM-R1Y8pg
We could add some cool features though like idempotency (don't install if
dependency is there and the upgrade option is disabled, etc).
from pybuilder.
Yes, we could add some new features, but this won't change the fact that 'pip' would not be executed on fedora since it is called 'pip-python' there ...
The API is not awesome, but managable:
https://github.com/pypa/pip/tree/develop/pip/commands
from pybuilder.
I mean these features would be accessible with the api. The command-line is
kinda limited.
On 21 Nov 2013 22:24, "Michael Gruber" [email protected] wrote:
Yes, we could add some new features, but this won't change the fact that
'pip' would not be executed on fedora since it is called 'pip-python' there
...The API is not awesome, but managable:
https://github.com/pypa/pip/tree/develop/pip/commands—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-29025841
.
from pybuilder.
Why is this labeled as a bug? Because it's broken on fedora?
from pybuilder.
Is it acceptable if we just scan PATH to decide whether to use pip-python
or pip
?
I just played around with the pip "API" and the InstallCommand wants an option parser as argument. I am not working with that kind of API.
from pybuilder.
This ...
import pip
pip.main(['install', 'committer'])
... works for me. What do you think about that?
from pybuilder.
Haha, ok. Yeah that works for me too. I think it's a bit ridiculous to call the command line entrypoint an "API" but due to the awesome separation of concerns (cough cough) the commands are all aware of the option parser anyway, so...
I guess that settles it, I'll implement this tomorrow. Thank you for your guidance!
from pybuilder.
Hi @aelgru , can you have a look at my branch? I ask for a review because I'm not overly happy with how it turned out. We need to prevent pip from cluttering up stdout/stderr (imho the contextmanager is the least ugly solution to this) and we need to deal with a possible SystemExit or whatever pip throws at us.
I haven't done any refactoring yet (the return codes are a good candidate for instance) because I don't want to do any superfluous work. Do you agree with the solution or should we look into something else like determining the adequate pip script name?
from pybuilder.
This is so annoying... 😠 ... looks like we have to write our own package installer.
My problem with the script solution: I guess the people who renamed pip
to pip-python
on Fedora systems had their reasons for doing that. There might be something else already called pip
. Detecting the right executable might not be straight forward too.
Using the "not existing API" of pip by calling the script entry point pip.main
might end up in an disaster too since there is no guarantee the this does not change ... since it is not an API.
What about checking
import platform
platform.linux_distribution()
?
If we are on a Fedora system we set the name of the script to pip-python
...
from pybuilder.
I don't like handling extra cases like that. It usually ends with a clusterf***.
For instance look at https://bugzilla.redhat.com/show_bug.cgi?id=958377 .
Starting with fedora 17, it's pip
instead of pip-python
again. So we have to check for fedora + for the fedora version, and decide from there.
from pybuilder.
Let's accept we learned a lot about pip and Fedora and close the issue. I am sorry for creating this issue at all.
from pybuilder.
Related Issues (20)
- There is no option to make Pybuilder use pre-release versions of modules when resolving dependencies with pip HOT 5
- Setuptools 62.2+ and twine require non-empty `long_description` HOT 16
- Python 3.11: remote process start fails in `_posixsubprocess.fork_exec` HOT 1
- The XML coverage report generated via PyBuilder can show wrong filenames and packages HOT 2
- pybuilder/terminal.py:135: ResourceWarning: unclosed file
- Python venv management needs to account for debug builds
- Should flake8 still be pinned?
- requests is not a dependency of pybuilder HOT 2
- distutils build_binary_distribution should run before "package" not "publish" HOT 2
- Problem in Windows OS HOT 3
- Module `imp` is not available in Python 3.12
- pybuilder does not run unit tests "correctly" - ModuleNotFoundError: No module named 'src' HOT 1
- pycharm: imports are unresolved but pyb works, also running the application works HOT 2
- support for netbeans or vscode HOT 4
- Specify Python version for virtual env HOT 4
- Newer versions of virtualenv causing clash with vendored virturalenv HOT 1
- Permission denied [Errno 13] when using source_distribution_plugin HOT 7
- Executing arbitrary shell command HOT 9
- SonarQube integration configuration HOT 10
- SonarQube passed ignoring test coverage threshold HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pybuilder.