Skip to content

Commit

Permalink
Make version name compliant with PEP440
Browse files Browse the repository at this point in the history
pip has deprecated (pypa/pip#8102) version names that do not comply with PEP440 (https://peps.python.org/pep-0440/).
Making this change also avoids what seems to be a bug in newer versions of setuptools which can mangle the shebang (#!) when installing gradient_unwarp.py using the fallback option used by pip for non-compliant packages.
  • Loading branch information
Luke Edwards authored and coalsont committed Jan 6, 2023
1 parent 10fc146 commit 9969a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ First, extract the gradunwarp tarball, and `cd` into the folder it creates. Then
```bash
python3 -m venv gradunwarp.build
source gradunwarp.build/bin/activate
pip3 install -r requirements.txt
pip3 install . --no-cache-dir --no-binary=gradunwarp
pip install -r requirements.txt
pip install .
deactivate
```
The arguments `--no-cache-dir --no-binary=gradunwarp` are required to suppress a warning arising from the version name of gradunwarp not complying with [python formatting rules](https://peps.python.org/pep-0440/).
The command `deactivate` ensures that your python environment is set to the way it was before.

After this installation, you can then use gradunwarp by adding
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def configuration(parent_package='', top_path=None):
return config

setup(name='gradunwarp',
version = 'HCP-1.2.0',
version = '1.2.0+HCP',
description = 'HCP version of Gradient Unwarping Package for Python/Numpy',
author = 'Human Connectome Project',
py_modules = mods,
Expand Down

0 comments on commit 9969a85

Please sign in to comment.