Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7066306
D8927.id32178.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8927.id32178.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Nov 5 2024, 5:31 AM (8 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216239
Attached To
D8927: setup.py: Ensure testing requirements include luigi
Event Timeline
Log In to Comment