Closed nofalx closed 8 months ago
Make file below
install: python$(PYTHON_VERSION) -m venv env . env/bin/activate && pip --version . env/bin/activate && python -m pip install --upgrade pip . env/bin/activate && pip--version . env/bin/activate && python -m pip install uv . env/bin/activate && uv pip install -r requirements.txt
for the file env/bin/daphne
env/bin/daphne
uv will produce this output
#!/project/env/bin/python # -*- coding: utf-8 -*- import re import sys from daphne.cli import CommandLineInterface.entrypoint if __name__ == "__main__": sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0]) sys.exit(CommandLineInterface.entrypoint())
pip without uv will produce this output
#!/project/env/bin/python # -*- coding: utf-8 -*- import re import sys from daphne.cli import CommandLineInterface if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(CommandLineInterface.entrypoint())
The issue lays in the from daphne.cli import CommandLineInterface.entrypoint as this is an invalid python code to import
from daphne.cli import CommandLineInterface.entrypoint
This was fixed by #1622.
How to produce?
Make file below
for the file
env/bin/daphne
uv will produce this output
pip without uv will produce this output
The issue
The issue lays in the
from daphne.cli import CommandLineInterface.entrypoint
as this is an invalid python code to import