Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pip install remi
For the most updated **experimental** version [Download](https://github.com/rawpython/remi/archive/master.zip) or check out Remi from git and install

```
python setup.py install
pip install .
```
or install directly using pip

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=40.8", "setuptools-scm"]
build-backend = "setuptools.build_meta"
14 changes: 5 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
params = {
'name':"remi",
'description':"Python REMote Interface library",
'use_scm_version':{'version_scheme': 'post-release'},
'use_scm_version':{
'version_scheme': 'post-release',
'fallback_version': '2026.03.24',
},
'long_description':long_description,
'long_description_content_type':"text/markdown",
'url':"https://github.com/rawpython/remi",
Expand All @@ -20,12 +23,5 @@
'license':"Apache",
'packages':setuptools.find_packages(),
'include_package_data':True,
'setup_requires':['setuptools_scm'],
'version': '2026.03.24',
}
try:
setup(**params)
except:
del params['setup_requires']
params['use_scm_version'] = False
setup(**params)
setup(**params)
8 changes: 4 additions & 4 deletions test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ def test_hardcoded_fallback_used(self):
importlib.reload(remi)

def test_fallback_version_matches_setup(self):
"""_FALLBACK_VERSION in __init__.py must match the version in setup.py."""
"""_FALLBACK_VERSION in __init__.py must match fallback_version in setup.py."""
setup_py = os.path.join(os.path.dirname(__file__), '..', 'setup.py')
setup_py = os.path.normpath(setup_py)
with open(setup_py) as f:
content = f.read()
# Extract the version string from setup.py: 'version': '...'
# Extract the fallback version string from setup.py.
import re
match = re.search(r"'version'\s*:\s*'([^']+)'", content)
self.assertIsNotNone(match, "Could not find 'version' in setup.py")
match = re.search(r"'fallback_version'\s*:\s*'([^']+)'", content)
self.assertIsNotNone(match, "Could not find 'fallback_version' in setup.py")
setup_version = match.group(1)
self.assertEqual(
remi._FALLBACK_VERSION,
Expand Down