-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Would it be possible to prevent pip-compile
to replace .
into -
?
#1595
Comments
pip-compile
to replace .
?pip-compile
to replace .
into -
?
Have you seen #1576? |
Thanks for reporting! Can you provide reproducible steps for that error message? |
They way I have installed python and activated sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update
sudo apt install python-dev -y
sudo apt install python2 -y
sudo apt install python-psutil -y
sudo apt install python3-dev -y
sudo apt install python3-pip -y
sudo apt install python3-venv -y
sudo apt install python3-virtualenv -y
sudo apt install python3.7 -y
sudo apt install python3.8-dev -y
sudo apt install python3.8-venv -y
VENV=$HOME/venv
python3.8 -m venv $VENV
source $VENV/bin/activate && $VENV/bin/python3.8 -m pip install --upgrade pip
sudo apt-get install -y libssl-dev zlib1g-dev gcc g++ make libgirepository1.0-dev
python3 -m pip install --no-use-pep517 cm-rgb
$VENV/bin/python3 -m pip install wheel -U
$VENV/bin/python3 -m pip install pip-tools -U |
Are you saying that running pip-compile directly raises that DistributionNotFound exception? If not, can you provide steps to reproduce that? |
No Basically, I install packages using Due to example setup.pyfile: #!/usr/bin/python3
from setuptools import find_packages, setup
requirements_filename = "requirements.txt"
with open(requirements_filename, "r") as f:
requirements = list(map(str.strip, f.read().split("\n")))[:-1]
setup(
name="project",
packages=find_packages(),
setup_requires=["wheel", "eth-brownie"],
version="2.0.0", # don't change this manually, use bumpversion instead
license="MIT",
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=requirements,
entry_points={
"console_scripts": ["run_me=project._cli.__main__:main"],
},
include_package_data=True,
python_requires=">=3.6,<4",
) |
OK I took your example setup file, replaced Now you are getting an error when you, what, use the setuptools-generated console script? Or when you use the code generally? If it's just the setuptools-generated console script that fails, I think that's a setuptools bug, as I wrote about in #1576 -- have you read that one yet? If it is just the generated script file that's the problem, try editing that file down to: #!/...keep original shebang here
import re
import sys
from project._cli.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main()) If it's not just the setuptools-generated script that fails, can you please provide the full steps needed to produce the error? |
I don't have a
Does correspoing
Yes. When I use the one under I can try to generate example from my main repo. On my end,
where |
The dots, underscores, and dashes are all interchangeable for package names. Can you try editing the launch script as above? |
How could I use the launch script above? I didn't get how it will fix the problem. I did not understand its
That's not correct on is the older version it was not writing with the dash form, or at least does not convert dot into dash. |
I hate to be so repetitive, but do please read the discussion at #1576. I think this issue here is really a duplicate of that one.
If you paste here the content of the launcher script that setuptools generates on your machine, I'll edit it to remove complications inserted by setuptools, for you to test.
Ah, by "always" I didn't mean for all of history, I just meant in all cases with current versions. Yes the behavior changed recently, matching similar changes within pip itself. |
Yeah issues seem duplicate of each other. I think that behavior change causing all the issues. For example correct version should be:
Would it be possible to prevent |
I'm not convinced there's good reason to change this convergence of canonicalized names, but will keep tracking the problems at #1576 until they are resolved one way or another. I'll close this one in favor of that one for now, and I've gone ahead and opened pypa/setuptools#3157 |
Environment Versions
pip-compile changes all
.
into-
which affects the correct pip installations, causes errors as follows:due to:
zope-traversing
replaced intozope.traversing
Example:
For example it changes
zope.traversing
intozope-traversing
, which is in correct.Would it be possible to prevent
pip-compile
to replace.
?The text was updated successfully, but these errors were encountered: