tliron / puccini

Cloud topology management and deployment tools based on TOSCA
https://puccini.cloud
Apache License 2.0
88 stars 20 forks source link

Python wrapper installation fails #126

Closed Shishqa closed 1 year ago

Shishqa commented 1 year ago

Now it is impossible to install puccini from latest source code.

> pip install git+https://github.com/tliron/puccini#subdirectory=wrappers/python                 
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/tliron/puccini#subdirectory=wrappers/python
  Cloning https://github.com/tliron/puccini to /tmp/pip-req-build-zysluqa9
  Running command git clone --filter=blob:none --quiet https://github.com/tliron/puccini /tmp/pip-req-build-zysluqa9
  Resolved https://github.com/tliron/puccini to commit 8d605c2e3e902df69876543f069e0b4352a4546a
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-zysluqa9/wrappers/python/setup.py", line 10, in <module>
          with open(os.path.join(os.path.dirname(__file__), 'puccini', '__init__.py')) as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-zysluqa9/wrappers/python/puccini/__init__.py'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
tliron commented 1 year ago

I think this was due to Puccini not having a release in a long time. :) I cut a release. Can you verify that it now works for you?

tliron commented 1 year ago

Sorry, I misread your issue report. You are installing from git, which is indeed broken. I will look into it.

tliron commented 1 year ago

After some consideration, this approach to installing a local build is no longer supported. The scripts/build-wrapper-python should be used. I've updated the documentation accordingly.