requirements-detector 1.2.2__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/PKG-INFO +4 -9
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/pyproject.toml +4 -4
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/handle_setup.py +2 -2
- requirements_detector-1.2.2/setup.py +0 -37
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/LICENSE +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/README.md +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/__init__.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/__main__.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/detect.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/exceptions.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/formatters.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/README.md +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/__init__.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/empty_constraint.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/exceptions.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/patterns.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/version.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/version_constraint.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/version_range.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/poetry_semver/version_union.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/requirement.py +0 -0
- {requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/run.py +0 -0
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: requirements-detector
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: Python tool to find and list requirements of a Python project
|
|
5
5
|
Home-page: https://github.com/landscapeio/requirements-detector
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: python,requirements detector
|
|
8
8
|
Author: Landscape.io
|
|
9
9
|
Author-email: code@landscape.io
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.8,<4.0
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Environment :: Console
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: License :: OSI Approved :: MIT License
|
|
15
15
|
Classifier: Operating System :: Unix
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.8
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
26
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
22
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
28
|
-
Requires-Dist: astroid (>=
|
|
23
|
+
Requires-Dist: astroid (>=3.0,<4.0)
|
|
29
24
|
Requires-Dist: packaging (>=21.3)
|
|
30
25
|
Requires-Dist: semver (>=3.0.0,<4.0.0)
|
|
31
26
|
Requires-Dist: toml (>=0.10.2,<0.11.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "requirements-detector"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.3.1"
|
|
4
4
|
authors = ["Landscape.io <code@landscape.io>"]
|
|
5
5
|
classifiers = [
|
|
6
6
|
'Development Status :: 5 - Production/Stable',
|
|
@@ -8,11 +8,11 @@ classifiers = [
|
|
|
8
8
|
'Intended Audience :: Developers',
|
|
9
9
|
'Operating System :: Unix',
|
|
10
10
|
'Topic :: Software Development :: Quality Assurance',
|
|
11
|
-
'Programming Language :: Python :: 3.7',
|
|
12
11
|
'Programming Language :: Python :: 3.8',
|
|
13
12
|
'Programming Language :: Python :: 3.9',
|
|
14
13
|
'Programming Language :: Python :: 3.10',
|
|
15
14
|
'Programming Language :: Python :: 3.11',
|
|
15
|
+
'Programming Language :: Python :: 3.12',
|
|
16
16
|
'License :: OSI Approved :: MIT License',
|
|
17
17
|
]
|
|
18
18
|
license = "MIT"
|
|
@@ -28,8 +28,8 @@ packages = [
|
|
|
28
28
|
detect-requirements = 'requirements_detector.run:run'
|
|
29
29
|
|
|
30
30
|
[tool.poetry.dependencies]
|
|
31
|
-
python = ">=3.
|
|
32
|
-
astroid = "^
|
|
31
|
+
python = ">=3.8,<4.0"
|
|
32
|
+
astroid = "^3.0"
|
|
33
33
|
packaging = ">=21.3"
|
|
34
34
|
toml = "^0.10.2"
|
|
35
35
|
semver = "^3.0.0"
|
{requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/handle_setup.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
from typing import Union
|
|
3
3
|
|
|
4
|
-
from astroid import MANAGER,
|
|
4
|
+
from astroid import MANAGER, AstroidSyntaxError
|
|
5
5
|
from astroid.builder import AstroidBuilder
|
|
6
6
|
from astroid.nodes import Assign, AssignName, Call, Const, Keyword, List, Name, Tuple
|
|
7
7
|
|
|
@@ -92,7 +92,7 @@ def from_setup_py(setup_file: Union[str, Path]):
|
|
|
92
92
|
|
|
93
93
|
try:
|
|
94
94
|
ast = AstroidBuilder(MANAGER).string_build(setup_file.open().read())
|
|
95
|
-
except (SyntaxError,
|
|
95
|
+
except (SyntaxError, AstroidSyntaxError):
|
|
96
96
|
# if the setup file is broken, we can't do much about that...
|
|
97
97
|
raise CouldNotParseRequirements
|
|
98
98
|
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from setuptools import setup
|
|
3
|
-
|
|
4
|
-
packages = \
|
|
5
|
-
['requirements_detector', 'requirements_detector.poetry_semver']
|
|
6
|
-
|
|
7
|
-
package_data = \
|
|
8
|
-
{'': ['*']}
|
|
9
|
-
|
|
10
|
-
install_requires = \
|
|
11
|
-
['astroid>=2.0,<3.0',
|
|
12
|
-
'packaging>=21.3',
|
|
13
|
-
'semver>=3.0.0,<4.0.0',
|
|
14
|
-
'toml>=0.10.2,<0.11.0']
|
|
15
|
-
|
|
16
|
-
entry_points = \
|
|
17
|
-
{'console_scripts': ['detect-requirements = requirements_detector.run:run']}
|
|
18
|
-
|
|
19
|
-
setup_kwargs = {
|
|
20
|
-
'name': 'requirements-detector',
|
|
21
|
-
'version': '1.2.2',
|
|
22
|
-
'description': 'Python tool to find and list requirements of a Python project',
|
|
23
|
-
'long_description': '# Requirements Detector\n\n## Status\n\n[](https://pypi.python.org/pypi/requirements-detector)\n[](https://github.com/landscapeio/requirements-detector/actions/workflows/ci.yaml)\n[](https://landscape.io/github/landscapeio/requirements-detector/master)\n[](https://coveralls.io/r/landscapeio/requirements-detector)\n[](https://readthedocs.org/projects/requirements-detector/)\n\n## About\n\n`requirements-detector` is a simple Python tool which attempts to find and list the requirements of a Python project.\n\nWhen run from the root of a Python project, it will try to ascertain which libraries and the versions of those libraries that the project depends on.\n\nIt uses the following methods in order, in the root of the project:\n\n1. Parse `setup.py` (if this is successful, the remaining steps are skipped)\n2. Parse `pyproject.yoml` (if a `tool.poetry.dependencies` section is found, the remaining steps are skipped)\n3. Parse `requirements.txt` or `requirements.pip`\n4. Parse all `*.txt` and `*.pip` files inside a folder called `requirements`\n5. Parse all files in the root folder matching `*requirements*.txt` or `reqs.txt` (so for example, `pip_requirements.txt` would match, as would `requirements_common.txt`)\n\n### Usage\n\n```\ndetect-requirements [path]\n```\nIf `path` is not specified, the current working directory will be used.\n\n### Output\n\nThe output will be plaintext, and match that of a [pip requirements file](http://www.pip-installer.org/en/latest/logic.html), for example:\n\n```\nDjango==1.5.2\nSouth>=0.8\nanyjson\ncelery>=2.2,<3\n```\n\n### Usage From Python\n\n```\n>>> import os\n>>> from requirements_detector import find_requirements\n>>> find_requirements(os.getcwd())\n[DetectedRequirement:Django==1.5.2, DetectedRequirement:South>=0.8, ...]\n```\n\n\nIf you know the relevant file or directory, you can use `from_requirements_txt`, `from_setup_py` or `from_requirements_dir` directly.\n\n```\n>>> from requirements_detector import from_requirements_txt\n>>> from_requirements_txt("/path/to/requirements.txt")\n[DetectedRequirement:Django==1.5.2, DetectedRequirement:South>=0.8, ...]\n```\n',
|
|
24
|
-
'author': 'Landscape.io',
|
|
25
|
-
'author_email': 'code@landscape.io',
|
|
26
|
-
'maintainer': 'None',
|
|
27
|
-
'maintainer_email': 'None',
|
|
28
|
-
'url': 'https://github.com/landscapeio/requirements-detector',
|
|
29
|
-
'packages': packages,
|
|
30
|
-
'package_data': package_data,
|
|
31
|
-
'install_requires': install_requires,
|
|
32
|
-
'entry_points': entry_points,
|
|
33
|
-
'python_requires': '>=3.7,<4.0',
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
setup(**setup_kwargs)
|
|
File without changes
|
|
File without changes
|
{requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/__init__.py
RENAMED
|
File without changes
|
{requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
{requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/exceptions.py
RENAMED
|
File without changes
|
{requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/formatters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{requirements_detector-1.2.2 → requirements_detector-1.3.1}/requirements_detector/requirement.py
RENAMED
|
File without changes
|
|
File without changes
|