polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
241 stars 115 forks source link

pip install --no-binary not working #366

Open Maharacha opened 9 months ago

Maharacha commented 9 months ago

Command: pip install --no-binary=substrate-interface substrate-interface

Error:

Collecting substrate-interface
  Using cached substrate-interface-1.7.4.tar.gz (79 kB)
  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-install-o987dgzu/substrate-interface_73527d050207490da052c782d8d1ad5c/setup.py", line 44, in <module>
          raise ValueError('Missing commit tag, can\'t set version')
      ValueError: Missing commit tag, can't set version
      [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.
Maharacha commented 9 months ago

And running: python setup.py egg_info in the source folder results in:

Traceback (most recent call last):
  File "/home/maharacha/versioned/py-substrate-interface/setup.py", line 44, in <module>
    raise ValueError('Missing commit tag, can\'t set version')
ValueError: Missing commit tag, can't set version
arjanz commented 9 months ago

During build, it expects a version being set in the environment, something like export CI_COMMIT_TAG=v0.1.

You can also modify https://github.com/polkascan/py-substrate-interface/blob/master/setup.py#L44 to a fixed version number e.g. version = '0.1'

Maharacha commented 9 months ago

Can you make it work with pip install --no-binary? I'm not sure what other libraries are doing to make it work but this is the only library for me that doesn't.