Skip to content

Commit b4c39b6

Browse files
committed
Fix build and installation issues on Gentoo
Make minigalaxy successfully install by running either `pip install .` or by running setup.py directly. Make sure all test packages are excluded from the installation process [1]. Use the regular build backend instead of the fallback [2]. Make the regular backend work by appending the current directory to Python PATH. This way we can pass the package version to setuptools [3]. [1]: https://projects.gentoo.org/python/guide/qawarn.html#example-for-test-packages-installed-by-setuptools [2]: https://projects.gentoo.org/python/guide/qawarn.html#setuptools-build-meta-legacy [3]: pypa/setuptools#3939 (comment)
1 parent 20d0cb2 commit b4c39b6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ dynamic= [
1616
]
1717

1818
[build-system]
19-
requires = ["setuptools", "wheel"]
20-
build-backend = "setuptools.build_meta:__legacy__"
19+
requires = ["setuptools"]
20+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
from glob import glob
33
import subprocess
44
import os
5-
from minigalaxy.version import VERSION
5+
import sys
6+
7+
sys.path.insert(0, os.getcwd())
8+
from minigalaxy.version import VERSION # noqa: E402
69

710
# Generate the translations
811
subprocess.run(['bash', 'scripts/compile-translations.sh'])
@@ -15,7 +18,7 @@
1518
setup(
1619
name="minigalaxy",
1720
version=VERSION,
18-
packages=find_packages(exclude=['tests']),
21+
packages=find_packages(exclude=['tests', 'tests.*']),
1922
scripts=['bin/minigalaxy'],
2023

2124
data_files=[

0 commit comments

Comments
 (0)