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
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ include remi/res/*
include editor/*
include editor/res/*
include LICENSE
recursive-include test *.py
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
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"

[project]
name = "remi"
# Keep in sync with _FALLBACK_VERSION in remi/__init__.py.
version = "2026.03.24"
description = "Python REMote Interface library"
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE"]
authors = [
{ name = "Davide Rosa", email = "dddomodossola@gmail.com" },
]
keywords = ["gui-library", "remi", "platform-independent", "ui", "gui"]

[project.urls]
Homepage = "https://github.com/rawpython/remi"
Download = "https://github.com/rawpython/remi/archive/master.zip"

[tool.setuptools.packages.find]
include = ["remi*", "editor*"]
2 changes: 1 addition & 1 deletion remi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Hardcoded fallback version — used when package metadata is unavailable
# (e.g. PyInstaller frozen builds, editable installs without metadata).
# Keep in sync with setup.py.
# Keep in sync with pyproject.toml.
_FALLBACK_VERSION = "2026.03.24"
__version__ = _FALLBACK_VERSION

Expand Down
31 changes: 0 additions & 31 deletions setup.py

This file was deleted.

24 changes: 12 additions & 12 deletions test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,22 @@ def test_hardcoded_fallback_used(self):
# Restore
importlib.reload(remi)

def test_fallback_version_matches_setup(self):
"""_FALLBACK_VERSION in __init__.py must match the 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:
def test_fallback_version_matches_pyproject(self):
"""_FALLBACK_VERSION in __init__.py must match the version in pyproject.toml."""
pyproject = os.path.join(os.path.dirname(__file__), '..', 'pyproject.toml')
pyproject = os.path.normpath(pyproject)
with open(pyproject) as f:
content = f.read()
# Extract the version string from setup.py: 'version': '...'
# Extract the version string from pyproject.toml: version = "..."
import re
match = re.search(r"'version'\s*:\s*'([^']+)'", content)
self.assertIsNotNone(match, "Could not find 'version' in setup.py")
setup_version = match.group(1)
match = re.search(r'^version\s*=\s*"([^"]+)"', content, re.MULTILINE)
self.assertIsNotNone(match, "Could not find 'version' in pyproject.toml")
pyproject_version = match.group(1)
self.assertEqual(
remi._FALLBACK_VERSION,
setup_version,
"_FALLBACK_VERSION in __init__.py (%s) does not match setup.py (%s)"
% (remi._FALLBACK_VERSION, setup_version),
pyproject_version,
"_FALLBACK_VERSION in __init__.py (%s) does not match pyproject.toml (%s)"
% (remi._FALLBACK_VERSION, pyproject_version),
)


Expand Down