Page MenuHomeSoftware Heritage

D8927.id32148.diff
No OneTemporary

D8927.id32148.diff

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (C) 2015-2020 The Software Heritage developers
+# Copyright (C) 2015-2022 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@@ -17,22 +17,23 @@
long_description = f.read()
-def parse_requirements(name=None):
- if name:
- reqf = "requirements-%s.txt" % name
- else:
- reqf = "requirements.txt"
-
+def parse_requirements(*names):
requirements = []
- if not path.exists(reqf):
- return requirements
+ for name in names:
+ if name:
+ reqf = "requirements-%s.txt" % name
+ else:
+ reqf = "requirements.txt"
+
+ if not path.exists(reqf):
+ return requirements
- with open(reqf) as f:
- for line in f.readlines():
- line = line.strip()
- if not line or line.startswith("#"):
- continue
- requirements.append(line)
+ with open(reqf) as f:
+ for line in f.readlines():
+ line = line.strip()
+ if not line or line.startswith("#"):
+ continue
+ requirements.append(line)
return requirements
@@ -48,12 +49,12 @@
author_email="swh-devel@inria.fr",
url="https://forge.softwareheritage.org/diffusion/DGRPH",
packages=find_packages(),
- install_requires=parse_requirements() + parse_requirements("swh"),
+ install_requires=parse_requirements(None, "swh"),
tests_require=parse_requirements("test"),
setup_requires=["setuptools-scm"],
use_scm_version=True,
extras_require={
- "testing": parse_requirements("test"),
+ "testing": parse_requirements("luigi", "test"),
"luigi": parse_requirements("luigi"),
},
include_package_data=True,

File Metadata

Mime Type
text/plain
Expires
Nov 5 2024, 4:57 AM (8 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216239

Event Timeline