cryptoadvance / cryptoadvance/specter-desktop

Bug: Invalid version: 'vx.y.z-get-replaced-by-release-script'

Open
#2,069 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
847
Forks
259
Avg merge
6d 18h
Merged PRs (30d)
2

Description

**Describe the bug**
Running `pip3 install -e . ` with I get:

```
pip3 install -e .
Obtaining file:///home//programs/specter-desktop
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/dist.py:543: UserWarning: The version specified ('vx.y.z-get-replaced-by-release-script') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
warnings.warn(
running egg_info
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/home//programs/specter-desktop/setup.py", line 39, in
setup(
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.ensure_finalized()
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
self.finalize_options()
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
parsed_version = parse_version(self.egg_version)
File "/home//programs/anaconda3/envs/python3.10.4/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/version.py", line 266, in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'vx.y.z-get-replaced-by-release-script'
[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.

```

**Steps to recreate:**
1. create fresh anaconda environment
2. `setuptools` version 66.0.0, python 3.10.4
3. do `pip3 install -e . `

**Desktop (please complete the following information):**
- Where is your node running: local(external)]
- Where is your specter running: linux, current master

**Possible causes:**
- `setuptools` version 66.0.0 enforces https://peps.python.org/pep-0440/ . This is supported by the fact, that in one of my environments where it builds fine I get the message `PkgResourcesDeprecationWarning: vx.y.z-get-replaced-by-release-script is an invalid version and will not be supported in a future release`

Contributor guide

Open the contributing guide

Research direction

Start with setup.py around line 39 and inspect how the package version is supplied during an editable install. Reproduce the failure in a fresh Python 3.10.4 environment with setuptools 66.0.0, then verify that package metadata generation and pip install -e . complete without the invalid-version error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.