Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPyfisch <pyfisch@posteo.org>2021-04-05 15:30:18 +0200
committerPyfisch <pyfisch@posteo.org>2021-04-05 15:59:10 +0200
commit7f691ce1c992c16551459162fbef593daad1e4c8 (patch)
tree145b4e74397d6f9337d7a76fd6cf9f0b248d26a5
parentc284092a15038355893c3ae20a42e3eb01d8295c (diff)
Switch to setup.cfg
Configure setup.cfg to find all Python packages. Add more metadata to package.
-rw-r--r--VERSION1
-rw-r--r--__init__.py3
-rw-r--r--archinstall/__init__.py4
-rw-r--r--setup.cfg35
-rw-r--r--setup.py29
5 files changed, 40 insertions, 32 deletions
diff --git a/VERSION b/VERSION
deleted file mode 100644
index abae0d9a..00000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-2.1.3 \ No newline at end of file
diff --git a/__init__.py b/__init__.py
deleted file mode 100644
index bd22d3f4..00000000
--- a/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# This __init__ file is just here to support the
-# use of archinstall as a git submodule.
-from .archinstall import *
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index d4452d38..c2773b64 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -14,6 +14,8 @@ from .lib.output import *
from .lib.storage import *
from .lib.hardware import *
+__version__ = "2.1.3"
+
## Basic version of arg.parse() supporting:
## --key=value
## --boolean
@@ -27,4 +29,4 @@ for arg in sys.argv[1:]:
key, val = arg[2:], True
arguments[key] = val
else:
- positionals.append(arg) \ No newline at end of file
+ positionals.append(arg)
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 00000000..ccbddf8a
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,35 @@
+[metadata]
+name = archinstall
+version = attr: archinstall.__version__
+description = Arch Linux installer - guided, templates etc.
+author = Anton Hvornum
+author_email = anton@hvornum.se
+long_description = file: README.md
+long_description_content_type = text/markdown
+license = GPL
+license_files =
+ LICENSE
+project_urls =
+ Source = https://github.com/archlinux/archinstall
+ Documentation = https://archinstall.readthedocs.io/
+classifers =
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
+ License :: OSI Approved :: GNU General Public License v3 (GPLv3)
+ Operating System :: POSIX :: Linux
+
+[options]
+packages = find:
+python_requires = >= 3.8
+
+[options.packages.find]
+include =
+ archinstall
+ archinstall.*
+
+[options.package_data]
+archinstall =
+ examples/*.py
+ profiles/*.py
+ profiles/applications/*.py
diff --git a/setup.py b/setup.py
index 35d51025..a4f49f92 100644
--- a/setup.py
+++ b/setup.py
@@ -1,27 +1,2 @@
-import setuptools, glob, shutil
-
-with open("README.md", "r") as fh:
- long_description = fh.read()
-
-with open('VERSION', 'r') as fh:
- VERSION = fh.read()
-
-setuptools.setup(
- name="archinstall",
- version=VERSION,
- author="Anton Hvornum",
- author_email="anton@hvornum.se",
- description="Arch Linux installer - guided, templates etc.",
- long_description=long_description,
- long_description_content_type="text/markdown",
- url="https://github.com/archlinux/archinstall",
- packages=setuptools.find_packages(),
- classifiers=[
- "Programming Language :: Python :: 3.8",
- "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
- "Operating System :: POSIX :: Linux",
- ],
- python_requires='>=3.8',
- setup_requires=['wheel'],
- package_data={'archinstall': glob.glob('examples/*.py') + glob.glob('profiles/*.py') + glob.glob('profiles/applications/*.py')},
-)
+import setuptools
+setuptools.setup()