Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fails to install in development mode #20

Closed
landmanbester opened this issue Jun 24, 2021 · 2 comments
Closed

Fails to install in development mode #20

landmanbester opened this issue Jun 24, 2021 · 2 comments

Comments

@landmanbester
Copy link
Collaborator

Not sure what's happening here but I can't seem to pip install with -e. I've tried this in python 3.6 and 3.7. Bails with

Running setup.py develop for packratt
    ERROR: Command errored out with exit status 1:
     command: /home/landman/venvs/pkrat/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/landman/Projects/packratt/setup.py'"'"'; __file__='"'"'/home/landman/Projects/packratt/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /home/landman/Projects/packratt/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/landman/venvs/pkrat/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/landman/Projects/packratt/setup.py'"'"'; __file__='"'"'/home/landman/Projects/packratt/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

but setuptools is installed and at the latest version

(pkrat) LAPTOP-ED4N50Q2 :: ~/Projects » python                                                                                                                                1 ↵
Python 3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>> setuptools.__version__
'57.0.0'

Any ideas?

@sjperkins
Copy link
Member

packratt's packaging and dependencies are managed by poetry so technically it isn't using setuptools.

Adding "setuptools" to https://github.com/ratt-ru/packratt/blob/master/pyproject.toml#L28 supports what you want to do, but that'd be a hybrid poetry/setuptools package management scheme.

pip install now creates a pristine environment with all the build dependencies specified in pyproject.toml.

Poetry does seem to support an editable mode now: python-poetry/poetry#3940

It may be simpler to just temporarily add setuptools to "requires" in pyproject.toml

@landmanbester
Copy link
Collaborator Author

Thanks, I managed. Do you want to close this one or keep it open?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants