From bcb8595f04d63ee32978833f3407864b9a770954 Mon Sep 17 00:00:00 2001 From: Carl George Date: Sep 02 2023 04:24:15 +0000 Subject: [PATCH 1/3] Clean up dependencies This change specifies the dependencies directly in setup.py, instead of in a requirements.txt file that is parsed by a helper function. --- diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 0c4bbb0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -pycurl -cryptography -rpkg -six -GitPython \ No newline at end of file diff --git a/setup.py b/setup.py index 434407a..72c340e 100644 --- a/setup.py +++ b/setup.py @@ -1,34 +1,5 @@ from setuptools import setup -def get_requirements(requirements_file="requirements.txt"): - """Get the contents of a file listing the requirements. - - :arg requirements_file: path to a requirements file - :type requirements_file: string - :returns: the list of requirements, or an empty list if - `requirements_file` could not be opened or read - :return type: list - """ - - lines = open(requirements_file).readlines() - dependencies = [] - for line in lines: - maybe_dep = line.strip() - if maybe_dep.startswith("#"): - # Skip pure comment lines - continue - if maybe_dep.startswith("git+"): - # VCS reference for dev purposes, expect a trailing comment - # with the normal requirement - __, __, maybe_dep = maybe_dep.rpartition("#") - else: - # Ignore any trailing comment - maybe_dep, __, __ = maybe_dep.partition("#") - # Remove any whitespace and assume non-empty results are dependencies - maybe_dep = maybe_dep.strip() - if maybe_dep: - dependencies.append(maybe_dep) - return dependencies setup( name="centpkg", @@ -39,6 +10,12 @@ setup( license="GPLv2+", package_dir={'': 'src'}, packages=['centpkg'], - install_requires=get_requirements(), + install_requires=[ + 'cryptography', + 'GitPython', + 'pycurl', + 'rpkg', + 'six', + ], scripts=['src/bin/centpkg', 'src/bin/centpkg-sig'], ) From 248917149bf43038946da1e17e52329fcc5e1881 Mon Sep 17 00:00:00 2001 From: Carl George Date: Sep 02 2023 04:29:30 +0000 Subject: [PATCH 2/3] Add missing python-gitlab dependency This was first introduced in 5fd982bf002697c81e3d07246baaecc3da59df6d. --- diff --git a/setup.py b/setup.py index 72c340e..1b99107 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ setup( install_requires=[ 'cryptography', 'GitPython', + 'python-gitlab', 'pycurl', 'rpkg', 'six', From 790841602b0ccebd7e9c248631e7f05feb593579 Mon Sep 17 00:00:00 2001 From: Carl George Date: Sep 02 2023 04:29:44 +0000 Subject: [PATCH 3/3] Add minimum rpkg version This is currently being enforced in the RPM spec file, but it would be better to enforce it in the Python metadata. https://src.fedoraproject.org/rpms/centpkg/c/4bd83a539854fca8e2b2e52bed9de51bfa5882b5 --- diff --git a/setup.py b/setup.py index 1b99107..455a76e 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( 'GitPython', 'python-gitlab', 'pycurl', - 'rpkg', + 'rpkg>=1.65', 'six', ], scripts=['src/bin/centpkg', 'src/bin/centpkg-sig'],