pax_global_header00006660000000000000000000000064146032274400014514gustar00rootroot0000000000000052 comment=e32294c6291f26ba399a085605a89d1939256867 requirements-parser-0.9.0/000077500000000000000000000000001460322744000155375ustar00rootroot00000000000000requirements-parser-0.9.0/.coveragerc000066400000000000000000000000471460322744000176610ustar00rootroot00000000000000[run] source = requirements branch = 1 requirements-parser-0.9.0/.editorconfig000066400000000000000000000011021460322744000202060ustar00rootroot00000000000000# EditorConfig is awesome: https://EditorConfig.org root = true [*] insert_final_newline = true charset = utf-8 trim_trailing_whitespace = true end_of_line = lf [*.py] indent_style = space indent_size = 4 [*.{yml,yaml}] indent_style = space indent_size = 2 [*.toml] indent_style = space indent_size = 2 [*.md] charset = latin1 indent_style = space indent_size = 2 # 2 trailing spaces indicate line breaks. trim_trailing_whitespace = false [*.{rst,txt}] indent_style = space indent_size = 4 [{*.ini,.bandit,.flake8}] charset = latin1 indent_style = space indent_size = 4 requirements-parser-0.9.0/.flake8000066400000000000000000000015361460322744000167170ustar00rootroot00000000000000[flake8] ## https://flake8.pycqa.org/en/latest/user/configuration.html ## keep in sync with isort config - in `isort.cfg` file exclude = build,dist,__pycache__,.eggs,*.egg-info*, *_cache,*.cache, .git,.tox,.venv,venv,.venv*,venv*, _OLD,_TEST, docs max-line-length = 120 max-complexity = 10 ignore = # ignore `self`, `cls` markers of flake8-annotations>=2.0 ANN101,ANN102 # ignore ANN401 for dynamically typed *args and **kwargs ANN401 # See https://www.flake8rules.com/rules/W503.html # > Despite being in the best practice section, this will soon be considered an anti-pattern. # So lets ignore this "suggestion" that is actually an anti-pattern already! W503 # Until we've refactored code, we need to ignore "is too complex" # See https://github.com/madpah/requirements-parser/issues/96 C901 requirements-parser-0.9.0/.github/000077500000000000000000000000001460322744000170775ustar00rootroot00000000000000requirements-parser-0.9.0/.github/workflows/000077500000000000000000000000001460322744000211345ustar00rootroot00000000000000requirements-parser-0.9.0/.github/workflows/deploy.yml000066400000000000000000000064701460322744000231620ustar00rootroot00000000000000name: Release on: push: branches: - main workflow_dispatch: inputs: release_force: # see https://python-semantic-release.readthedocs.io/en/latest/github-action.html#command-line-options description: | Force release be one of: [major | minor | patch] Leave empty for auto-detect based on commit messages. type: choice options: - "" # auto - no force - major # force major - minor # force minor - patch # force patch default: "" required: false prerelease_token: description: 'The "pre-release identifier" to use as a prefix for the "pre-release" part of a semver. Like the rc in `1.2.0-rc.8`.' type: choice options: - rc - beta - alpha default: rc required: false prerelease: description: "Is a pre-release" type: boolean default: false required: false concurrency: group: deploy cancel-in-progress: false # prevent duplicates semantic-release env: PYTHON_VERSION_DEFAULT: "3.12" POETRY_VERSION: "1.8.1" permissions: id-token: write contents: write jobs: build-and-release: # https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482 # limit this to being run on regular commits, not the commits that semantic-release will create if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):') runs-on: ubuntu-latest concurrency: release steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python Environment # see https://github.com/actions/setup-python uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION_DEFAULT }} architecture: 'x64' - name: Install poetry # see https://github.com/marketplace/actions/setup-poetry uses: Gr1N/setup-poetry@v9 with: poetry-version: ${{ env.POETRY_VERSION }} - name: Install dependencies run: poetry install --no-root - name: Python Semantic Release id: release # see https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html # see https://github.com/python-semantic-release/python-semantic-release uses: python-semantic-release/python-semantic-release@v9.1.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} force: ${{ github.event.inputs.release_force }} prerelease: ${{ github.event.inputs.prerelease }} prerelease_token: ${{ github.event.inputs.prerelease_token }} - name: Publish package distributions to PyPI if: steps.release.outputs.released == 'true' # see https://github.com/pypa/gh-action-pypi-publish uses: pypa/gh-action-pypi-publish@release/v1 - name: Publish package distributions to GitHub Releases if: steps.release.outputs.released == 'true' # see https://github.com/python-semantic-release/upload-to-gh-release uses: python-semantic-release/upload-to-gh-release@main with: github_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ steps.release.outputs.tag }} requirements-parser-0.9.0/.github/workflows/poetry.yml000066400000000000000000000115171460322744000232060ustar00rootroot00000000000000# For details of what checks are run for PRs please refer below # docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions name: Python CI on: push: branches: ["main"] pull_request: workflow_dispatch: schedule: # schedule weekly tests, since some dependencies are not intended to be pinned # this means: at 23:42 on Fridays - cron: '42 23 * * 5' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: REPORTS_DIR: CI_reports PYTHON_VERSION_DEFAULT: "3.12" POETRY_VERSION: "1.8.1" TESTS_REPORTS_ARTIFACT: tests-reports jobs: coding-standards: name: Linting & CodingStandards runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout # see https://github.com/actions/checkout uses: actions/checkout@v4 - name: Setup Python Environment # see https://github.com/actions/setup-python uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION_DEFAULT }} architecture: 'x64' - name: Install poetry # see https://github.com/marketplace/actions/setup-poetry uses: Gr1N/setup-poetry@v9 with: poetry-version: ${{ env.POETRY_VERSION }} - name: Install dependencies run: poetry install --no-root - name: Run tox run: poetry run tox run -e flake8 -s false static-code-analysis: name: StaticCodingAnalysis (py${{ matrix.python-version}}${{ matrix.toxenv-factors }}) runs-on: ${{ matrix.os }} timeout-minutes: 10 strategy: fail-fast: false matrix: include: - # test with the locked dependencies os: ubuntu-latest python-version: '3.12' toxenv-factors: '-current' - # test with the lowest dependencies os: ubuntu-latest python-version: '3.8' toxenv-factors: '-lowest' steps: - name: Checkout # see https://github.com/actions/checkout uses: actions/checkout@v4 - name: Setup Python Environment # see https://github.com/actions/setup-python uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: 'x64' - name: Install poetry # see https://github.com/marketplace/actions/setup-poetry uses: Gr1N/setup-poetry@v9 with: poetry-version: ${{ env.POETRY_VERSION }} - name: Install dependencies run: poetry install --no-root - name: Run tox run: poetry run tox run -e mypy${{ matrix.toxenv-factors }} -s false build-and-test: name: Test (${{ matrix.os }} py${{ matrix.python-version }}) runs-on: ${{ matrix.os }} timeout-minutes: 15 strategy: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] python-version: - "3.12" # highest supported - "3.11" - "3.10" - "3.9" - "3.8" # lowest supported steps: - name: Disabled Git auto EOL CRLF transforms run: | git config --global core.autocrlf false git config --global core.eol lf - name: Checkout # see https://github.com/actions/checkout uses: actions/checkout@v4 - name: Create reports directory run: mkdir ${{ env.REPORTS_DIR }} - name: Setup Python Environment # see https://github.com/actions/setup-python uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: 'x64' - name: Validate Python Environment run: echo "import sys; print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))" | python - name: Install poetry # see https://github.com/marketplace/actions/setup-poetry uses: Gr1N/setup-poetry@v9 with: poetry-version: ${{ env.POETRY_VERSION }} - name: Install dependencies run: poetry install --no-root - name: Ensure build successful run: poetry build - name: Run tox run: poetry run tox run -e py${{ matrix.toxenv-factors }} -s false - name: Generate coverage reports if: ${{ failure() || success() }} shell: bash run: | set -eux poetry run coverage report -m poetry run coverage xml -o ${{ env.REPORTS_DIR }}/coverage-${{ matrix.os }}-${{ matrix.python-version }}.xml && poetry run coverage html -d ${{ env.REPORTS_DIR }} - name: Artifact reports if: ${{ ! cancelled() }} # see https://github.com/actions/upload-artifact uses: actions/upload-artifact@v3 with: name: ${{ env.TESTS_REPORTS_ARTIFACT }} path: ${{ env.REPORTS_DIR }} if-no-files-found: error requirements-parser-0.9.0/.gitignore000066400000000000000000000005101460322744000175230ustar00rootroot00000000000000# Exlude python build & distribution directories build/ dist/ *.egg-info* # Exlude *.pyc *.pyc # Exclude test-related items .tox/* # Exclude coverage .coverage test-reports # Exclude Python Virtual Environment venv/* .venv/* # Exlude IDE related files .idea/* .vscode/* # Build docs docs/_build # mypy caches /.mypy_cacherequirements-parser-0.9.0/.isort.cfg000066400000000000000000000010711460322744000174350ustar00rootroot00000000000000[settings] ## read the docs: https://pycqa.github.io/isort/docs/configuration/options.html ## keep in sync with flake8 config - in `.flake8` file known_first_party = requirements skip_gitignore = false skip_glob = build/*,dist/*,__pycache__,.eggs,*.egg-info*, *_cache,*.cache, .git/*,.tox/*,.venv/*,venv/*,.venv*/*,venv*/*, _OLD/*,_TEST/*, docs/* combine_as_imports = true default_section = THIRDPARTY ensure_newline_before_comments = true include_trailing_comma = true line_length = 120 multi_line_output = 3 src_paths = requirements tests requirements-parser-0.9.0/.mypy.ini000066400000000000000000000014261460322744000173170ustar00rootroot00000000000000[mypy] files = requirements/ show_error_codes = True pretty = True warn_unreachable = True allow_redefinition = False # ignore_missing_imports = False # follow_imports = normal # follow_imports_for_stubs = True ### Strict mode ### warn_unused_configs = True disallow_subclassing_any = True disallow_any_generics = True disallow_untyped_calls = True disallow_untyped_defs = True disallow_incomplete_defs = True check_untyped_defs = True disallow_untyped_decorators = True no_implicit_optional = True warn_redundant_casts = True warn_return_any = True no_implicit_reexport = True warn_unused_ignores = True [mypy-pytest.*] ignore_missing_imports = True [mypy-tests.*] disallow_untyped_decorators = False requirements-parser-0.9.0/.readthedocs.yaml000066400000000000000000000024311460322744000207660ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Set the version of Python and other tools you might need build: os: ubuntu-20.04 tools: python: "3.11" # You can also specify other tool versions: # nodejs: "16" # rust: "1.55" # golang: "1.17" # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py # Formats formats: all # Optionally declare the Python requirements required to build your docs python: install: - method: pip path: . - requirements: docs/requirements.txt requirements-parser-0.9.0/AUTHORS.rst000066400000000000000000000003731460322744000174210ustar00rootroot00000000000000AUTHORS ======= - David Fischer (@davidfischer) - Trey Hunner (@treyhunner) - Dima Veselov (@dveselov) - Sascha Peilicke (@saschpe) - Jayson Reis (@jaysonsantos) - Max Shenfield (@mshenfield) - Nicolas Delaby (@ticosax) - Stéphane Bidoul (@sbidoul) requirements-parser-0.9.0/CHANGELOG.md000066400000000000000000000741711460322744000173620ustar00rootroot00000000000000# CHANGELOG ## v0.9.0 (2024-04-03) ### Feature * feat: handle hashes without error (thanks to @dymart via #67) (#98) Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`a9aafc9`](https://github.com/madpah/requirements-parser/commit/a9aafc9a36caa77df6fad6c2dd9a076d72668c28)) ## v0.8.0 (2024-04-03) ### Feature * feat: Add support for Python 3.12 #93 via #94 feat: Drop support for Python 3.7 as part of #91 fix: Publish anciliary files only to sdist #66 via #87 (thanks to Maxwell G <maxwell@gtmx.me>) fix: Type of `Requirement.specs` was incorrect #78 fix: `-e` in `requirements.txt` did not handle local paths correctly #97 chore(dev-deps): Updated all development dependencies chore(deps): include types-setuptools as dependency Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`16ffe88`](https://github.com/madpah/requirements-parser/commit/16ffe88b71502c7b41b62893cf6f1408439ba35d)) ### Unknown * 0.7.0 Release (#95) Signed-off-by: Paul Horton <paul.horton@owasp.org> Co-authored-by: Maxwell G <maxwell@gtmx.me> ([`5c3442a`](https://github.com/madpah/requirements-parser/commit/5c3442a103e6e6e3c06bc875023da25c5ac9f572)) ## v0.7.0 (2024-03-28) ### Chore * chore: update release workflow to run from main Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`c363b80`](https://github.com/madpah/requirements-parser/commit/c363b805cf88c4cd52947a0cfc428e92468c7961)) * chore: update release workflow to run from main Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`10f0c07`](https://github.com/madpah/requirements-parser/commit/10f0c07ddc372e638e46d9481a40ec402414f66d)) ### Feature * feat: Drop support for Python 3.6, add support for Python 3.11 (#92) Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`1a455be`](https://github.com/madpah/requirements-parser/commit/1a455be331eff38dc19108da7f13c3129dcba43d)) ## v0.6.0 (2024-03-27) ### Chore * chore: revert CHANGELOG Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`2c52fef`](https://github.com/madpah/requirements-parser/commit/2c52fef60a49bee60587f7212a4e9c1a9ddf97b4)) * chore: updates for semantic versioning Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`e27c717`](https://github.com/madpah/requirements-parser/commit/e27c717e24181d8c102fd1d3e29996d2dbf3d081)) * chore: update publishing to PyPi to use Trusted Publishing Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`1a09ab9`](https://github.com/madpah/requirements-parser/commit/1a09ab950d94d049c3279cf56372453eb87c9dc1)) * chore: Revert CHANGELOG.md ([`d71ab54`](https://github.com/madpah/requirements-parser/commit/d71ab54657b25f6985d307c84f61dff017b137c0)) ### Feature * feat: upgrade CI workflows to get them running again (#90) * ci: update actions to latest for all workflows Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`e76a3f5`](https://github.com/madpah/requirements-parser/commit/e76a3f553d145bcd9fdcb2c8aa7424b607056ee0)) ### Unknown * 0.6.0 Automatically generated by python-semantic-release ([`d6755f2`](https://github.com/madpah/requirements-parser/commit/d6755f2f39884d80dd8147b42969fce1a2ae0562)) * Merge branch 'master' of github.com:madpah/requirements-parser ([`58d5e50`](https://github.com/madpah/requirements-parser/commit/58d5e50fe15221ede167960a6ec019104e5436ff)) * 0.6.0 Automatically generated by python-semantic-release ([`3724009`](https://github.com/madpah/requirements-parser/commit/3724009b7d10804fc0938c47950f9967ffe86ed3)) * doc: install requirements.txt before building docs Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`1ce9236`](https://github.com/madpah/requirements-parser/commit/1ce923617147dd984c280d56cb1f02fcd3589a7c)) * doc: minor doc improvements Signed-off-by: Paul Horton <paul.horton@owasp.org> ([`ee91237`](https://github.com/madpah/requirements-parser/commit/ee9123745ca3cd78826b2eddd3abe2644920d15c)) ## v0.5.0 (2022-01-20) ### Chore * chore: added license header to source files Signed-off-by: Paul Horton <phorton@sonatype.com> ([`b8d5c56`](https://github.com/madpah/requirements-parser/commit/b8d5c5630c2297d298064c012e352816eb420e86)) ### Feature * feat: support all documented options in requirements files #62 (#63) * feat: support all documented options in requirements files #62 Signed-off-by: Paul Horton <phorton@sonatype.com> * fixed type bug Signed-off-by: Paul Horton <phorton@sonatype.com> ([`f92c0c0`](https://github.com/madpah/requirements-parser/commit/f92c0c079bce03b1860c78852d2c8c48cf32d539)) ### Unknown * 0.5.0 Automatically generated by python-semantic-release ([`19e3ddf`](https://github.com/madpah/requirements-parser/commit/19e3ddf21e600f92ac29a83811beaff94f8f5410)) ## v0.4.0 (2022-01-18) ### Chore * chore: removed dependency not yet required Signed-off-by: Paul Horton <phorton@sonatype.com> ([`5184747`](https://github.com/madpah/requirements-parser/commit/51847473358f567be245ae0f993a1ee924ec06ee)) * chore: exclude built docs from git Signed-off-by: Paul Horton <phorton@sonatype.com> ([`24463ba`](https://github.com/madpah/requirements-parser/commit/24463ba19a88265fc8aa0003c2b7f33f9ef88e93)) * chore: exclude built docs from git Signed-off-by: Paul Horton <phorton@sonatype.com> ([`9487044`](https://github.com/madpah/requirements-parser/commit/948704494fa8003b5d400f6594d5276400c76e85)) ### Feature * feat: library is now typed according to PEP561 * chore: added static analysis to CI Signed-off-by: Paul Horton <phorton@sonatype.com> ([`0e1bb6a`](https://github.com/madpah/requirements-parser/commit/0e1bb6a746857a59c50530155d24da487a40c4be)) ### Unknown * 0.4.0 Automatically generated by python-semantic-release ([`a16fd0b`](https://github.com/madpah/requirements-parser/commit/a16fd0b948e44526b8d228240a7692156498ef8e)) * doc: readthedocs config Signed-off-by: Paul Horton <phorton@sonatype.com> ([`793ce91`](https://github.com/madpah/requirements-parser/commit/793ce914074430882ba447782ae9127d8312d0bf)) * doc: readthedocs config Signed-off-by: Paul Horton <phorton@sonatype.com> ([`203a0ed`](https://github.com/madpah/requirements-parser/commit/203a0ed322f3a69ffbec2a1c54a27d457583a55d)) * doc: readthedocs config Signed-off-by: Paul Horton <phorton@sonatype.com> ([`9d22e23`](https://github.com/madpah/requirements-parser/commit/9d22e23317cd87cd73337b8af871c5655dd87fb7)) ## v0.3.1 (2021-12-17) ### Fix * fix: readthedocs config Signed-off-by: Paul Horton <phorton@sonatype.com> ([`ac1e7fb`](https://github.com/madpah/requirements-parser/commit/ac1e7fb616a2c15e83b8a5ca630ffd50aad4aedb)) ### Unknown * 0.3.1 Automatically generated by python-semantic-release ([`186cfd4`](https://github.com/madpah/requirements-parser/commit/186cfd4a0d90628915a4f6e3bd827a0fe2981ee7)) ## v0.3.0 (2021-12-17) ### Chore * chore: added missing config for mypy Signed-off-by: Paul Horton <phorton@sonatype.com> ([`4fb1bf5`](https://github.com/madpah/requirements-parser/commit/4fb1bf5d27ed530704823bf7ffee4cabba844bd5)) * chore: addressed flake8 reports Signed-off-by: Paul Horton <phorton@sonatype.com> ([`d3ee857`](https://github.com/madpah/requirements-parser/commit/d3ee857790a730821c8089f860595846b0ea855a)) * chore: add poetry configuration Signed-off-by: Paul Horton <phorton@sonatype.com> ([`4b54c79`](https://github.com/madpah/requirements-parser/commit/4b54c79bf703dd927ee686be4413a6eb6687d409)) * chore: migrated to Apache 2.0 license Signed-off-by: Paul Horton <phorton@sonatype.com> ([`5b7a6e4`](https://github.com/madpah/requirements-parser/commit/5b7a6e49e355a37fa6674876db4b692e8bf82943)) * chore: updated gitignore Signed-off-by: Paul Horton <phorton@sonatype.com> ([`07bea05`](https://github.com/madpah/requirements-parser/commit/07bea05c08da7e84e75557f6340fc80440d48f4c)) ### Ci * ci: disable type static-code-analysis until we have typed the library Signed-off-by: Paul Horton <phorton@sonatype.com> ([`c8da36d`](https://github.com/madpah/requirements-parser/commit/c8da36de4e6e16c12216a5b9bf0113bb990fe9aa)) * ci: added GitHub workflow to release `requirements-parser` doc: updated license and changelog to work with new release process Signed-off-by: Paul Horton <phorton@sonatype.com> ([`068e3f8`](https://github.com/madpah/requirements-parser/commit/068e3f8b8d55c0d51c721a6b001271b2613e14f5)) * ci: temporarily disable min-requirements testing with tox Signed-off-by: Paul Horton <phorton@sonatype.com> ([`ae53393`](https://github.com/madpah/requirements-parser/commit/ae5339399fed0e739ee152a3328f2c314ecb17ad)) * ci: temporarily disable min-requirements testing with tox Signed-off-by: Paul Horton <phorton@sonatype.com> ([`550f8af`](https://github.com/madpah/requirements-parser/commit/550f8af422cc772a5fd16cfa2f947754c4a54115)) * ci: added GitHub workflow for CI Signed-off-by: Paul Horton <phorton@sonatype.com> ([`ceba061`](https://github.com/madpah/requirements-parser/commit/ceba061868ee62083c6b2c02a1dd3357620ff6e9)) ### Feature * feat: added some typing fix: corrected a regex Signed-off-by: Paul Horton <phorton@sonatype.com> ([`169ff6e`](https://github.com/madpah/requirements-parser/commit/169ff6e79657d8091e6e1a4e21c7da794d507832)) * feat: removed Python 2 code Signed-off-by: Paul Horton <phorton@sonatype.com> ([`82f9473`](https://github.com/madpah/requirements-parser/commit/82f94733f912e140fdcc0254020f4208d3e4a892)) ### Fix * fix: removed version from __init__ Signed-off-by: Paul Horton <phorton@sonatype.com> ([`4e83b9d`](https://github.com/madpah/requirements-parser/commit/4e83b9d3bdd5534da7adfdeb292ad2a1fae73ea8)) ### Test * test: cleaned up some sample code Signed-off-by: Paul Horton <phorton@sonatype.com> ([`99ffc65`](https://github.com/madpah/requirements-parser/commit/99ffc65e7ad3d1a7842800cd489099cdf2681f88)) * test: migrated test_requirement to use unittest Signed-off-by: Paul Horton <phorton@sonatype.com> ([`e17734a`](https://github.com/madpah/requirements-parser/commit/e17734a9afec2ebd518baadca6db4e7da6848c25)) * test: migrated test_parser to unittest and added some minor test fixes Signed-off-by: Paul Horton <phorton@sonatype.com> ([`5d2eebe`](https://github.com/madpah/requirements-parser/commit/5d2eebec15e087a91594778090bcc06ce00d8927)) ### Unknown * 0.3.0 Automatically generated by python-semantic-release ([`8760e01`](https://github.com/madpah/requirements-parser/commit/8760e01d59c1bb60c65dfbc6321eab506d05fab7)) * Merge pull request #56 from madpah/feat/migrate-to-poetry Migration to Poetry and other updates after David kindly transferred to Paul ([`8833cdb`](https://github.com/madpah/requirements-parser/commit/8833cdb128ce7909c4d0dbe635fce2a410ff4023)) * doc: README is now in Markdown, not RST Signed-off-by: Paul Horton <phorton@sonatype.com> ([`3d78272`](https://github.com/madpah/requirements-parser/commit/3d78272588ab537e825cd32b37f8a6010d6f8d57)) * doc: README is now in Markdown, not RST Signed-off-by: Paul Horton <phorton@sonatype.com> ([`2a9dcf7`](https://github.com/madpah/requirements-parser/commit/2a9dcf768d5c7ca542456ad45a8664008ef1b861)) * doc: updated doc generation and changelog generation Signed-off-by: Paul Horton <phorton@sonatype.com> ([`6f73ee5`](https://github.com/madpah/requirements-parser/commit/6f73ee5e9478176c1efeb72087f3b1d9e9c4340c)) * Merge pull request #27 from belak/belak/editable-eol-comments Fix parsing lines using -e and end of line comments ([`ea3dbee`](https://github.com/madpah/requirements-parser/commit/ea3dbeec76628878f6b1bbcb865670c29957f2c2)) * Merge pull request #34 from chrislawlor/feature/requirement-equality Adds equality (and inequality) testing to Requirement class ([`d8e6737`](https://github.com/madpah/requirements-parser/commit/d8e67370cb96e535146c318ac9ec33d91f8231cc)) * Merge pull request #44 from jayvdb/sdist MANIFEST.in: Add tests and docs ([`beda9cf`](https://github.com/madpah/requirements-parser/commit/beda9cf56111bce73fbbc52ca971407fec46a9f1)) * .travis.yml: Run Python 3.8 without coverage ([`b265c38`](https://github.com/madpah/requirements-parser/commit/b265c3862bbdd88ca76bf0ddd465ca6fc48be220)) * .travis.yml: Replace 3.3 with 3.7 & 3.8 Travis no longer provides 3.3 ([`772412a`](https://github.com/madpah/requirements-parser/commit/772412a1d380517fed41d65889f20cfd828e3f5d)) * MANIFEST.in: Add tests and docs ([`ecabc1d`](https://github.com/madpah/requirements-parser/commit/ecabc1db4ab71618647bf283c49d3e10e6ef139a)) * Merge pull request #38 from cooperlees/master Add setuptools as a install_requires Dependency ([`ad404ad`](https://github.com/madpah/requirements-parser/commit/ad404add0423d7e1f419c3a48dc884375d57f376)) * Add setuptools as a install_requires pkg_resources is needed at runtime, lets be explicit and state that so pip etc. do the right thing. ([`212078b`](https://github.com/madpah/requirements-parser/commit/212078ba15e8af7817461fb65e16c257061107fc)) ## v0.2.0 (2018-11-15) ### Unknown * Increment version ([`52f802c`](https://github.com/madpah/requirements-parser/commit/52f802c77573c0e64240cd47246de01ffbf96c0c)) * Update changelog for release ([`2fd0faf`](https://github.com/madpah/requirements-parser/commit/2fd0faf6a742536fd2da20595607426a265f96cf)) * Adds equality (and inequality) testing to Requirement class ([`de158d7`](https://github.com/madpah/requirements-parser/commit/de158d7bf72b8faef8f82c484dbe6f6ca9d149e6)) * Merge pull request #33 from sbidoul/preserve-login-sbi preserve login part of uri ([`caca172`](https://github.com/madpah/requirements-parser/commit/caca172b80d448c6175c1b4f5777781d583fc9b7)) * preserve login part of uri ([`c34f405`](https://github.com/madpah/requirements-parser/commit/c34f405d7cd4ff1157248c8f883fd5450ce7b7eb)) * Update the README ([`a3dc6d2`](https://github.com/madpah/requirements-parser/commit/a3dc6d256eca92e5e101b045c9de5f7fa07460c7)) * Add an authors file to credit helpful folks ([`90571d3`](https://github.com/madpah/requirements-parser/commit/90571d3d311bc96512d7f204972116c37f6fc3d9)) * Merge branch 'subdirectory-sbi' of https://github.com/sbidoul/requirements-parser into sbidoul-subdirectory-sbi ([`b9f0290`](https://github.com/madpah/requirements-parser/commit/b9f0290cd38e3af19ccf4c63dbc5feb473732967)) * Merge pull request #30 from ticosax/fix-vcs-extras_require Fix vcs urls parsing with extras_require ([`f9e93d0`](https://github.com/madpah/requirements-parser/commit/f9e93d0d057c0fe9a958c4b0dff1353074868835)) * Merge pull request #28 from ticosax/fix-master-py36 Produce more predictable output for tests ([`4aaeae7`](https://github.com/madpah/requirements-parser/commit/4aaeae76275792f4161a22c4e8f6a07f829083a3)) * support subdirectory fragment ([`fd2c098`](https://github.com/madpah/requirements-parser/commit/fd2c09861512b1232d4af723db36c1f4be038be9)) * [FIX] specs and extras are now unordered Fix tests, reckoning that setuptools.parse does not preserve ordering of specs and extras anymore. ([`5c8f85d`](https://github.com/madpah/requirements-parser/commit/5c8f85d50d986b36392ec14a17bee53c8f12ab5f)) * fixup! Extract extras from fragment's egg when vcs is specified ([`cab9ebd`](https://github.com/madpah/requirements-parser/commit/cab9ebdb834498791368dc3d86b9eef4eacf4f47)) * Extract extras from fragment's egg when vcs is specified ([`01b2f5c`](https://github.com/madpah/requirements-parser/commit/01b2f5c592405feadc833f7eaea48769b1b8a1bd)) * Produce expected output during tests pkg_req.extras and pkg_req.specs are stored in Sets and thus ordering can't be predicted. ([`44812d9`](https://github.com/madpah/requirements-parser/commit/44812d907cc499618b2718bf3acf36812d70e514)) * Produce expected output during tests pkg_req.extras and pkg_req.specs are stored in Sets and thus ordering can't be predicted. ([`817229e`](https://github.com/madpah/requirements-parser/commit/817229ea4c8837995fcaab09c7c25691e764fde2)) * Merge pull request #29 from ticosax/drop-python-3.2 Drop python 3.2 as it is not maintained since February 2016 ([`659c4af`](https://github.com/madpah/requirements-parser/commit/659c4af2c3c3b365e35b0462c2797ffd88f3761c)) * Drop python 3.2 as it is not maintained since February 2016 https://docs.python.org/devguide/devcycle.html#summary ([`bf11658`](https://github.com/madpah/requirements-parser/commit/bf116582b6d737a6971445823b812b326d58f99f)) * Drop Python2.6 support; Add 3.6 support ([`e35b9f7`](https://github.com/madpah/requirements-parser/commit/e35b9f70de74251e16f76305d006eca63abcb086)) * Merge pull request #24 from mshenfield/issue-22-add-hash-information-to-requirements Add hash and hash_name fragment ([`af136a1`](https://github.com/madpah/requirements-parser/commit/af136a11123ebf3acc8eac983a3ef2c3586193a9)) * Fix parsing lines using -e and end of line comments ([`95006a3`](https://github.com/madpah/requirements-parser/commit/95006a3dd1343fee721ae479deb53083530edac8)) * Flake8 3.0 dropped support for Python26 ([`4a43544`](https://github.com/madpah/requirements-parser/commit/4a43544dfc22cd08835ddbf8b920b7e5a3e3b283)) * Add setup.py notes about 3.4-3.5 ([`9e85381`](https://github.com/madpah/requirements-parser/commit/9e85381a57913d2d8b79c119127363ebbcfc5bbd)) * Travis CI updates - Add Python 3.4-3.5 - fix an issue with old pip ([`93428bb`](https://github.com/madpah/requirements-parser/commit/93428bbc48637d00269651ae07d0977d4cae5a97)) * Add hash and hash_name from fragment This supports retreiving hashing algorithms [supported by pip](https://github.com/pypa/pip/blob/281eb61b09d87765d7c2b92f6982b3fe76ccb0af/pip/index.py#L947). If multiple algorithms are present in the fragemnt portion of a url, the hashes included in the requirement will be non-deterministic. ([`86c46b3`](https://github.com/madpah/requirements-parser/commit/86c46b32debb50f57284a06f010c27a30d646efd)) * Merge pull request #23 from mshenfield/issue-22-support-hashlib-hashes-in-uri-fragment Parsing fragment supports arbitrary keys ([`b05c2ff`](https://github.com/madpah/requirements-parser/commit/b05c2ffa806f72b1d4248a20423711bbe458fb5c)) * Bump coverage for testing to < 4 to fix Travis 3.2 build More information on the travis-ci issue tracker [here](https://github.com/travis-ci/travis-ci/issues/4866) ([`09379dc`](https://github.com/madpah/requirements-parser/commit/09379dc16995b6cf2b88381a2830b1aa695cd08e)) * Added test for editable local files This satisfies coveralls. Because I added lines of code to an untested portion of the codebase, the overall coverage went down. ([`5db4fde`](https://github.com/madpah/requirements-parser/commit/5db4fde6d387c276f0d87c4e06bef309acedfd21)) * Parsing fragment supports arbitrary keys This switches parsing the fragment (string following '#' at the end of a requirement) from looking for 'egg' at the beginning of the fragment to allowing any key value pair. These can be extracted as needed - right now only the 'egg' key is used to get the name of the package. Tests include URI with a single fragment, and multiple fragments. ([`f9559f7`](https://github.com/madpah/requirements-parser/commit/f9559f7c364c9ea8e9e4d3a888ee33266de69e40)) ## v0.1.0 (2015-05-03) ### Unknown * Update versions ([`c84b72a`](https://github.com/madpah/requirements-parser/commit/c84b72ad3f4318832cf87f9610c2f7a49c590964)) * Update sphinx theme ([`c54532c`](https://github.com/madpah/requirements-parser/commit/c54532cf22a82e266cb4a13ca25d67c1c36156b8)) * Update the year ([`294959e`](https://github.com/madpah/requirements-parser/commit/294959ef80ad81796c4135ef7ac961c3e30c9194)) * Update the changelog ([`8efccb2`](https://github.com/madpah/requirements-parser/commit/8efccb276d950ff35dda6ce9d03a52ad19111bf3)) * Merge pull request #19 from jaysonsantos/master add ability to parse recursive requirements ([`5b1721f`](https://github.com/madpah/requirements-parser/commit/5b1721fe82241d1f84a3c822b7d4bdc0eb12505a)) * Fix pep8 max column size ([`8fefe15`](https://github.com/madpah/requirements-parser/commit/8fefe15c24f4b1bd7017ff6f7452fc266940a153)) * add ability to parse recursive requirements ([`fa55463`](https://github.com/madpah/requirements-parser/commit/fa55463ddc3e08c652308c29dbd31dceb41564c8)) * Merge pull request #17 from saschpe/master-underscores Properly parse underscores ([`a6af275`](https://github.com/madpah/requirements-parser/commit/a6af275c96523cd781fa6b1f6b1e1c7f697d504f)) * Properly parse underscores pkg_resources.Requirement's constructor calls save_name() on the project_name member which converts underscores to hyphens. Thus use Requirement.unsafe_name (the pristine name) instead. ([`6403d51`](https://github.com/madpah/requirements-parser/commit/6403d5145f1ad7b3705a624b614900eace5433eb)) ## v0.0.6 (2013-08-17) ### Unknown * v0.0.6 :sparkles: ([`7b0cc23`](https://github.com/madpah/requirements-parser/commit/7b0cc239db30581809e081071b6945d63980173c)) * v0.0.5 :sparkles: ([`773bba5`](https://github.com/madpah/requirements-parser/commit/773bba5d8bdab0cbe674220fea0d96320204b743)) ## v0.0.5 (2013-08-17) ### Unknown * Dated the changelog ([`e2e13c4`](https://github.com/madpah/requirements-parser/commit/e2e13c4ce20963378f57959f9eb70845e4ba1be4)) * Bumped version ([`e5c22ce`](https://github.com/madpah/requirements-parser/commit/e5c22cebdcdb4bfcdf9d9014dd7333c72ca6f131)) * Added usage for common examples ([`e907e6c`](https://github.com/madpah/requirements-parser/commit/e907e6c9f65736ec45c829a8b2034b6c01e87e74)) * Added installation ([`de70666`](https://github.com/madpah/requirements-parser/commit/de706660238413b39d23cde47b09edc540f3aefa)) * Oops ([`56e2cd7`](https://github.com/madpah/requirements-parser/commit/56e2cd74120803449bc7cc0cfee17346fcd9e1ca)) * Added documentation ([`8e11fdd`](https://github.com/madpah/requirements-parser/commit/8e11fdd4e7126b98f4cb58d61c2984bd71356962)) * :sparkles: 2013 (I'm late) ([`8c8131c`](https://github.com/madpah/requirements-parser/commit/8c8131c97a4f61513acd87218163053ad5e397ad)) * Added coverage badge ([`045c686`](https://github.com/madpah/requirements-parser/commit/045c686ce0d004bd33612b5034e247dfc5d15e4b)) * Merge pull request #15 from davidfischer/coveralls Added code coverage ([`57cbe4b`](https://github.com/madpah/requirements-parser/commit/57cbe4b9f2981780b9b74b2d55eeea044fda1297)) * Added code coverage ([`c36dc51`](https://github.com/madpah/requirements-parser/commit/c36dc51ce8439139cbada3ea3e4555a10e72804d)) * Merge pull request #14 from davidfischer/parser-refactor Big parser refactor ([`547106f`](https://github.com/madpah/requirements-parser/commit/547106f67d92c82a2f5e0ea66c5881e7685a3c8a)) * Switch to unicode literals ([`b8810af`](https://github.com/madpah/requirements-parser/commit/b8810af9e686c18e05029541ee005d3baecb7a67)) * Big parser refactor * broke the parser into a Requirement class * refactored the unit test suite * better handling of VCS ([`a7a4910`](https://github.com/madpah/requirements-parser/commit/a7a4910a78cc38881c7a6559a45d274f146ca3c7)) * Merge pull request #13 from davidfischer/refactor-tests Refactored tests into test files ([`a12ffae`](https://github.com/madpah/requirements-parser/commit/a12ffae3b8204ed4b0978e605d3f811013f066a4)) * Refactored tests into test files Each test has a txt file and an expected file (except "fails") ([`3058539`](https://github.com/madpah/requirements-parser/commit/3058539596fe8fe851aae79e396a1223996ccbd3)) * Merge pull request #9 from valmet/master Compiled regular expressions ([`9d8af15`](https://github.com/madpah/requirements-parser/commit/9d8af15ce4dec6128aefdb793a29e85133884547)) * It should be pass tests... please. ([`a4cf621`](https://github.com/madpah/requirements-parser/commit/a4cf6213d07a9c51242bd150431c8829842b87e1)) * Oh, shi~... autopep8. ([`28d483e`](https://github.com/madpah/requirements-parser/commit/28d483ee529beeed61efd22a8d9a39a47bde9094)) * Flags ([`78b17aa`](https://github.com/madpah/requirements-parser/commit/78b17aa3d7d73146b505fccf05c5db17d3b0b6ad)) * Compiled regular expressions ([`9adb0a5`](https://github.com/madpah/requirements-parser/commit/9adb0a574dafcb26d0157ca564b01afd93a89c25)) * Introduce code quality ([`26f1067`](https://github.com/madpah/requirements-parser/commit/26f106751400971666862306cc63dcfcd24c3c9c)) ## v0.0.4 (2013-05-29) ### Unknown * Version v0.0.4 :sparkles: ([`3d7cc24`](https://github.com/madpah/requirements-parser/commit/3d7cc24fe904223f11dc1f982fe64232d8a8f10c)) * Slight stylistic change ([`51d0369`](https://github.com/madpah/requirements-parser/commit/51d036997e961cd17b2d553b61fc2c01892d6dbd)) * Ignore file can handle multiple virtualenvs ([`0f2246a`](https://github.com/madpah/requirements-parser/commit/0f2246ad8f63cfaee399cb9a790d95b94132df88)) * Merge pull request #7 from davidfischer/pkg-resources Use pkg_resources for parsing ([`48a8179`](https://github.com/madpah/requirements-parser/commit/48a81792130808883d30be0a6432aa5695a88c80)) * Added a couple tests ([`a0a448f`](https://github.com/madpah/requirements-parser/commit/a0a448f5d07b291eaec05ec984a9311ac3ea5147)) * Finally got this right ([`6d8200e`](https://github.com/madpah/requirements-parser/commit/6d8200ec02942abb791b2e2db3a728cd3999139b)) * Fixed typo ([`b7fbb35`](https://github.com/madpah/requirements-parser/commit/b7fbb35fbf9ff58d9ef5ab31b78a55d8be4f32f7)) * Updated readme with new example ([`de275bb`](https://github.com/madpah/requirements-parser/commit/de275bbf7502409b7971ef5c08bcc8621bedca1b)) * Using pkg_resources to parse requirements * Backwards incompatible API change! * Using regex for URI/file/VCS requirements ([`1e272de`](https://github.com/madpah/requirements-parser/commit/1e272de42e8b943d4d2e79b9b071a5b87dde3f20)) * Permission fix ([`cdc5b4b`](https://github.com/madpah/requirements-parser/commit/cdc5b4bece1f66923ddd7b66d211d034488cc6bf)) ## v0.0.3 (2013-05-28) ### Unknown * Version 0.0.3 :sparkles: ([`fc0a140`](https://github.com/madpah/requirements-parser/commit/fc0a1403c9a9eae5f093906fac811420f8c66c9f)) * Updated name in license ([`f7ecdab`](https://github.com/madpah/requirements-parser/commit/f7ecdaba0d13c6c7297c712f68aaa488626f23bc)) * Name change on travis ([`ef38eb6`](https://github.com/madpah/requirements-parser/commit/ef38eb6384080a1de38d6781dfebc2c848cdbf41)) * Merge pull request #6 from davidfischer/name-change Changed name to requirements parser ([`2c56a6b`](https://github.com/madpah/requirements-parser/commit/2c56a6b66dfd7904debdc13a1b64fcb2c0455bc3)) * Changed name to requirements parser Changed module name to requirements ([`d995b0c`](https://github.com/madpah/requirements-parser/commit/d995b0cf6d5c1c852b5cf85a65bc2d03875a82aa)) ## v0.0.2 (2013-05-27) ### Unknown * Version v0.0.2 :sparkles: ([`772bda4`](https://github.com/madpah/requirements-parser/commit/772bda498571f7d3ff00d08834bf7f42e3556bc7)) * Formatting improvements ([`662e85e`](https://github.com/madpah/requirements-parser/commit/662e85e49f20a84a6ce03167c1f16f075f9d7539)) * No longer testing on 3.0 and 3.1 However, the wall of superpowers at least checks for Programming Language :: Python :: 3 ([`14bc67d`](https://github.com/madpah/requirements-parser/commit/14bc67d0e1eb5144b5219a7590d2d4aa4b7561ef)) * Travis does not support Python 3.0 or Python 3.1 http://about.travis-ci.org/docs/user/ci-environment/#Python-VM-images ([`7971479`](https://github.com/madpah/requirements-parser/commit/7971479453716d4d8d67383eeeda7fafc1553ff9)) * Merge pull request #2 from treyhunner/add-manifest Add manifest ([`d7649b6`](https://github.com/madpah/requirements-parser/commit/d7649b607799566332b239ddea6197aea0d54e69)) * Add MANIFEST file noting inclusion of rst files ([`87fe595`](https://github.com/madpah/requirements-parser/commit/87fe595679ab14d35ba50c3f44d846d792378c62)) * Bump version (between releases) ([`426e337`](https://github.com/madpah/requirements-parser/commit/426e337895fa3a9ffb9dd2c81d1d833ec3609c53)) * Merge pull request #1 from davidfischer/image-fix Fix travis-ci link ([`85601b6`](https://github.com/madpah/requirements-parser/commit/85601b6ff1b665f18571a3986fd1d5eeff3a1b05)) * Fix travis-ci link ([`944ae07`](https://github.com/madpah/requirements-parser/commit/944ae07dc1967b32ef61d1357a4e323d2a9e9290)) * Fixed copy/paste issues ([`015058d`](https://github.com/madpah/requirements-parser/commit/015058da1c86ee92fca281b8ee4bfe12d51507dc)) * Added classifiers for 3.x ([`866a887`](https://github.com/madpah/requirements-parser/commit/866a88740d822d2bc4bed2b789407713f73b8651)) * Added unit testing for Python3 ([`47c6742`](https://github.com/madpah/requirements-parser/commit/47c67429c6417b1a097910aac6fec4b2052dd269)) * Added 3.x compatibility ([`fe6789f`](https://github.com/madpah/requirements-parser/commit/fe6789fe6aecc0e84a850d695813aea0d87ccb48)) * Added travis-ci image ([`e4b612e`](https://github.com/madpah/requirements-parser/commit/e4b612e5949b4115e71157b3b84c46933a729746)) * Added continuous integration ([`8aa6e53`](https://github.com/madpah/requirements-parser/commit/8aa6e532ddf18c9421b15282af9b65a0cb3ab8b8)) * Added additional test from crate.io reqs ([`ad1ae22`](https://github.com/madpah/requirements-parser/commit/ad1ae222070aaec860ed1199d0122b69da88b91d)) ## v0.0.1 (2012-11-25) ### Unknown * Added license file ([`f243bc5`](https://github.com/madpah/requirements-parser/commit/f243bc58d172e1ac0d6e453782c6b61cba879f4d)) * Added tests and fixed corresponding issues - added RTFD req files as tests - added tests for warnings and other tests - updated parser to handle more edge cases ([`8434fd2`](https://github.com/madpah/requirements-parser/commit/8434fd25f928fe0f9de48e7ad4a71407fd388e76)) * Added the first cut - parse editables (svn+http...) - parse file URIs - parse "normal" - parse extras ([`d04253a`](https://github.com/madpah/requirements-parser/commit/d04253a61e85faee3b6000f8620af05114b8ba48)) * Added test for file-like obj ([`819de98`](https://github.com/madpah/requirements-parser/commit/819de98a18d87018aee905bf1e6afab6d3f8197c)) * Added trivial version - Added test for empty parse - Added version info - Added setup.py - Added parser that always returns empty ([`168d8c1`](https://github.com/madpah/requirements-parser/commit/168d8c1cebd956cf8f5fba708bb1eab3725315c2)) * Added README with proposed functionality - Parse function accepts file or string - CONSIDER: list of dicts instead of tuples ([`0a0e4d7`](https://github.com/madpah/requirements-parser/commit/0a0e4d70af7a3b9766b223a809e51fb2dedf224b)) * Added ignorefile ([`e25c719`](https://github.com/madpah/requirements-parser/commit/e25c719360406409f819a03b620d527b3aa2a835)) requirements-parser-0.9.0/CODEOWNERS000066400000000000000000000000121460322744000171230ustar00rootroot00000000000000* @madpah requirements-parser-0.9.0/LICENSE000066400000000000000000000261341460322744000165520ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.requirements-parser-0.9.0/README.md000066400000000000000000000033711460322744000170220ustar00rootroot00000000000000Requirements Parser =================== [![Python CI](https://github.com/madpah/requirements-parser/actions/workflows/poetry.yml/badge.svg)](https://github.com/madpah/requirements-parser/actions/workflows/poetry.yml) [![Documentation Status](http://readthedocs.org/projects/requirements-parser/badge/?version=latest)](http://requirements-parser.readthedocs.io/en/latest/?badge=latest) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) This is a small Python module for parsing [Pip](http://www.pip-installer.org/) requirement files. The goal is to parse everything in the [Pip requirement file format](https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format) spec. Installation ============ pip install requirements-parser or poetry add requirements-parser Examples ======== Requirements parser can parse a file-like object or a text string. ``` {.python} >>> import requirements >>> with open('requirements.txt', 'r') as fd: ... for req in requirements.parse(fd): ... print(req.name, req.specs) Django [('>=', '1.11'), ('<', '1.12')] six [('==', '1.10.0')] ``` It can handle most if not all of the options in requirement files that do not involve traversing the local filesystem. These include: - editables (`-e git+https://github.com/toastdriven/pyelasticsearch.git]{.title-ref}`) - version control URIs - egg hashes and subdirectories (`[\#egg=django-haystack&subdirectory=setup]{.title-ref}`) - extras ([DocParser\[PDF\]]{.title-ref}) - URLs Documentation ============= For more details and examples, the documentation is available at: . Change Log ========== Change log is available on GitHub [here]() requirements-parser-0.9.0/docs/000077500000000000000000000000001460322744000164675ustar00rootroot00000000000000requirements-parser-0.9.0/docs/Makefile000066400000000000000000000152321460322744000201320ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/RequirementsParser.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/RequirementsParser.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/RequirementsParser" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/RequirementsParser" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." requirements-parser-0.9.0/docs/changelog.rst000066400000000000000000000012161460322744000211500ustar00rootroot00000000000000.. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 .. mdinclude:: ../CHANGELOG.mdrequirements-parser-0.9.0/docs/conf.py000066400000000000000000000051471460322744000177750ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 # # Requirements Parser documentation build configuration file, created by # sphinx-quickstart on Fri Aug 16 07:44:12 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # -- Project information ----------------------------------------------------- import pkg_resources project = "Requirements Parser" copyright = "2015 - David Fischer, 2021 - Paul Horton" author = "David Fischer, Paul Horton" # The full version, including alpha/beta/rc tags release = pkg_resources.get_distribution("requirements-parser").version master_doc = 'index' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx_rtd_theme", "m2r2" ] # Support both RST and MD source_suffix = ['.rst', '.md'] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"]requirements-parser-0.9.0/docs/index.rst000066400000000000000000000026541460322744000203370ustar00rootroot00000000000000.. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 Welcome to Requirements Parser's documentation! =============================================== Requirements parser is a Python module for parsing Pip_ requirement files. .. _Pip: http://www.pip-installer.org Requirements parser is (now) `Apache 2.0`_ licensed. .. _Apache 2.0: https://www.apache.org/licenses/LICENSE-2.0 Quickstart: .. code-block:: python import requirements reqfile = """ Django>=1.5,<1.6 DocParser[PDF]==1.0.0 """ for req in requirements.parse(reqfile): print(req.name, req.specs, req.extras) Will output: :: Django [('>=', '1.5'), ('<', '1.6')] [] DocParser [('==', '1.0.0')] ['pdf'] Contents: .. toctree:: :maxdepth: 2 usage changelog lowlevel Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` requirements-parser-0.9.0/docs/lowlevel.rst000066400000000000000000000022061460322744000210520ustar00rootroot00000000000000.. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 Low level API ============= Higher Level Parsing -------------------- Typically this is called via: .. code-block:: python import requirements requirements.parse('django>=1.5') .. automodule:: requirements.parser :members: Lower Level Parsing ------------------- Under the hood, the :class:`Requirement ` class does most of the heavy lifting. .. automodule:: requirements.requirement :members: Misc Functions -------------- .. automodule:: requirements :members: requirements-parser-0.9.0/docs/requirements.txt000066400000000000000000000014561460322744000217610ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 # This file includes dependencies specifically required to build our Documentation. m2r2>=0.3.2 Sphinx>=4.3.2 sphinx-autoapi>=1.8.4 sphinx-rtd-theme>=1.0.0requirements-parser-0.9.0/docs/usage.rst000066400000000000000000000037221460322744000203310ustar00rootroot00000000000000.. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 Usage ===== Requirements parser works very similarly to the way pip actually parses requirement files except that pip typically proceeds to install the relevant packages. Requirements come in a variety of forms such as requirement specifiers (such as requirements>=0.0.5), version control URIs, other URIs and local file paths. Parsing requirement specifiers ------------------------------ .. code-block:: python import requirements req = "django>=1.5,<1.6" parsed = list(requirements.parse(req))[0] parsed.name # django parsed.specs # [('>=', '1.5'), ('<', '1.6')] parsed.specifier # True Parsing version control requirements ------------------------------------ .. code-block:: python req = "-e git+git://github.com/toastdriven/django-haystack@259274e4127f723d76b893c87a82777f9490b960#egg=django_haystack" parsed = list(requirements.parse(req))[0] parsed.name # django_haystack parsed.vcs # git parsed.revision # 259274e4127f723d76b893c87a82777f9490b960 parsed.uri # git+git://github.com/toastdriven/django-haystack parsed.editable # True (because of the -e option) Parsing local files ------------------- .. code-block:: python req = "-e path/to/project" parsed = list(requirements.parse(req))[0] parsed.local_file # True parsed.path # path/to/project requirements-parser-0.9.0/poetry.lock000066400000000000000000000734621460322744000177470ustar00rootroot00000000000000# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. [[package]] name = "attrs" version = "23.2.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.7" files = [ {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, ] [package.extras] cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] dev = ["attrs[tests]", "pre-commit"] docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] tests = ["attrs[tests-no-zope]", "zope-interface"] tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] [[package]] name = "autopep8" version = "2.1.0" description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" optional = false python-versions = ">=3.8" files = [ {file = "autopep8-2.1.0-py2.py3-none-any.whl", hash = "sha256:2bb76888c5edbcafe6aabab3c47ba534f5a2c2d245c2eddced4a30c4b4946357"}, {file = "autopep8-2.1.0.tar.gz", hash = "sha256:1fa8964e4618929488f4ec36795c7ff12924a68b8bf01366c094fc52f770b6e7"}, ] [package.dependencies] pycodestyle = ">=2.11.0" tomli = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "cachetools" version = "5.3.3" description = "Extensible memoizing collections and decorators" optional = false python-versions = ">=3.7" files = [ {file = "cachetools-5.3.3-py3-none-any.whl", hash = "sha256:0abad1021d3f8325b2fc1d2e9c8b9c9d57b04c3932657a72465447332c24d945"}, {file = "cachetools-5.3.3.tar.gz", hash = "sha256:ba29e2dfa0b8b556606f097407ed1aa62080ee108ab0dc5ec9d6a723a007d105"}, ] [[package]] name = "chardet" version = "5.2.0" description = "Universal encoding detector for Python 3" optional = false python-versions = ">=3.7" files = [ {file = "chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970"}, {file = "chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7"}, ] [[package]] name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] [[package]] name = "coverage" version = "7.4.4" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ {file = "coverage-7.4.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0be5efd5127542ef31f165de269f77560d6cdef525fffa446de6f7e9186cfb2"}, {file = "coverage-7.4.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ccd341521be3d1b3daeb41960ae94a5e87abe2f46f17224ba5d6f2b8398016cf"}, {file = "coverage-7.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09fa497a8ab37784fbb20ab699c246053ac294d13fc7eb40ec007a5043ec91f8"}, {file = "coverage-7.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b1a93009cb80730c9bca5d6d4665494b725b6e8e157c1cb7f2db5b4b122ea562"}, {file = "coverage-7.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:690db6517f09336559dc0b5f55342df62370a48f5469fabf502db2c6d1cffcd2"}, {file = "coverage-7.4.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:09c3255458533cb76ef55da8cc49ffab9e33f083739c8bd4f58e79fecfe288f7"}, {file = "coverage-7.4.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8ce1415194b4a6bd0cdcc3a1dfbf58b63f910dcb7330fe15bdff542c56949f87"}, {file = "coverage-7.4.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b91cbc4b195444e7e258ba27ac33769c41b94967919f10037e6355e998af255c"}, {file = "coverage-7.4.4-cp310-cp310-win32.whl", hash = "sha256:598825b51b81c808cb6f078dcb972f96af96b078faa47af7dfcdf282835baa8d"}, {file = "coverage-7.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:09ef9199ed6653989ebbcaacc9b62b514bb63ea2f90256e71fea3ed74bd8ff6f"}, {file = "coverage-7.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0f9f50e7ef2a71e2fae92774c99170eb8304e3fdf9c8c3c7ae9bab3e7229c5cf"}, {file = "coverage-7.4.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:623512f8ba53c422fcfb2ce68362c97945095b864cda94a92edbaf5994201083"}, {file = "coverage-7.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0513b9508b93da4e1716744ef6ebc507aff016ba115ffe8ecff744d1322a7b63"}, {file = "coverage-7.4.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40209e141059b9370a2657c9b15607815359ab3ef9918f0196b6fccce8d3230f"}, {file = "coverage-7.4.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a2b2b78c78293782fd3767d53e6474582f62443d0504b1554370bde86cc8227"}, {file = "coverage-7.4.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:73bfb9c09951125d06ee473bed216e2c3742f530fc5acc1383883125de76d9cd"}, {file = "coverage-7.4.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1f384c3cc76aeedce208643697fb3e8437604b512255de6d18dae3f27655a384"}, {file = "coverage-7.4.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:54eb8d1bf7cacfbf2a3186019bcf01d11c666bd495ed18717162f7eb1e9dd00b"}, {file = "coverage-7.4.4-cp311-cp311-win32.whl", hash = "sha256:cac99918c7bba15302a2d81f0312c08054a3359eaa1929c7e4b26ebe41e9b286"}, {file = "coverage-7.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:b14706df8b2de49869ae03a5ccbc211f4041750cd4a66f698df89d44f4bd30ec"}, {file = "coverage-7.4.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:201bef2eea65e0e9c56343115ba3814e896afe6d36ffd37bab783261db430f76"}, {file = "coverage-7.4.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:41c9c5f3de16b903b610d09650e5e27adbfa7f500302718c9ffd1c12cf9d6818"}, {file = "coverage-7.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d898fe162d26929b5960e4e138651f7427048e72c853607f2b200909794ed978"}, {file = "coverage-7.4.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ea79bb50e805cd6ac058dfa3b5c8f6c040cb87fe83de10845857f5535d1db70"}, {file = "coverage-7.4.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce4b94265ca988c3f8e479e741693d143026632672e3ff924f25fab50518dd51"}, {file = "coverage-7.4.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:00838a35b882694afda09f85e469c96367daa3f3f2b097d846a7216993d37f4c"}, {file = "coverage-7.4.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:fdfafb32984684eb03c2d83e1e51f64f0906b11e64482df3c5db936ce3839d48"}, {file = "coverage-7.4.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:69eb372f7e2ece89f14751fbcbe470295d73ed41ecd37ca36ed2eb47512a6ab9"}, {file = "coverage-7.4.4-cp312-cp312-win32.whl", hash = "sha256:137eb07173141545e07403cca94ab625cc1cc6bc4c1e97b6e3846270e7e1fea0"}, {file = "coverage-7.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:d71eec7d83298f1af3326ce0ff1d0ea83c7cb98f72b577097f9083b20bdaf05e"}, {file = "coverage-7.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d5ae728ff3b5401cc320d792866987e7e7e880e6ebd24433b70a33b643bb0384"}, {file = "coverage-7.4.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cc4f1358cb0c78edef3ed237ef2c86056206bb8d9140e73b6b89fbcfcbdd40e1"}, {file = "coverage-7.4.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8130a2aa2acb8788e0b56938786c33c7c98562697bf9f4c7d6e8e5e3a0501e4a"}, {file = "coverage-7.4.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf271892d13e43bc2b51e6908ec9a6a5094a4df1d8af0bfc360088ee6c684409"}, {file = "coverage-7.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a4cdc86d54b5da0df6d3d3a2f0b710949286094c3a6700c21e9015932b81447e"}, {file = "coverage-7.4.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ae71e7ddb7a413dd60052e90528f2f65270aad4b509563af6d03d53e979feafd"}, {file = "coverage-7.4.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:38dd60d7bf242c4ed5b38e094baf6401faa114fc09e9e6632374388a404f98e7"}, {file = "coverage-7.4.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa5b1c1bfc28384f1f53b69a023d789f72b2e0ab1b3787aae16992a7ca21056c"}, {file = "coverage-7.4.4-cp38-cp38-win32.whl", hash = "sha256:dfa8fe35a0bb90382837b238fff375de15f0dcdb9ae68ff85f7a63649c98527e"}, {file = "coverage-7.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:b2991665420a803495e0b90a79233c1433d6ed77ef282e8e152a324bbbc5e0c8"}, {file = "coverage-7.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3b799445b9f7ee8bf299cfaed6f5b226c0037b74886a4e11515e569b36fe310d"}, {file = "coverage-7.4.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b4d33f418f46362995f1e9d4f3a35a1b6322cb959c31d88ae56b0298e1c22357"}, {file = "coverage-7.4.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aadacf9a2f407a4688d700e4ebab33a7e2e408f2ca04dbf4aef17585389eff3e"}, {file = "coverage-7.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c95949560050d04d46b919301826525597f07b33beba6187d04fa64d47ac82e"}, {file = "coverage-7.4.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff7687ca3d7028d8a5f0ebae95a6e4827c5616b31a4ee1192bdfde697db110d4"}, {file = "coverage-7.4.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5fc1de20b2d4a061b3df27ab9b7c7111e9a710f10dc2b84d33a4ab25065994ec"}, {file = "coverage-7.4.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c74880fc64d4958159fbd537a091d2a585448a8f8508bf248d72112723974cbd"}, {file = "coverage-7.4.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:742a76a12aa45b44d236815d282b03cfb1de3b4323f3e4ec933acfae08e54ade"}, {file = "coverage-7.4.4-cp39-cp39-win32.whl", hash = "sha256:d89d7b2974cae412400e88f35d86af72208e1ede1a541954af5d944a8ba46c57"}, {file = "coverage-7.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:9ca28a302acb19b6af89e90f33ee3e1906961f94b54ea37de6737b7ca9d8827c"}, {file = "coverage-7.4.4-pp38.pp39.pp310-none-any.whl", hash = "sha256:b2c5edc4ac10a7ef6605a966c58929ec6c1bd0917fb8c15cb3363f65aa40e677"}, {file = "coverage-7.4.4.tar.gz", hash = "sha256:c901df83d097649e257e803be22592aedfd5182f07b3cc87d640bbb9afd50f49"}, ] [package.extras] toml = ["tomli"] [[package]] name = "distlib" version = "0.3.8" description = "Distribution utilities" optional = false python-versions = "*" files = [ {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, ] [[package]] name = "filelock" version = "3.13.3" description = "A platform independent file lock." optional = false python-versions = ">=3.8" files = [ {file = "filelock-3.13.3-py3-none-any.whl", hash = "sha256:5ffa845303983e7a0b7ae17636509bc97997d58afeafa72fb141a17b152284cb"}, {file = "filelock-3.13.3.tar.gz", hash = "sha256:a79895a25bbefdf55d1a2a0a80968f7dbb28edcd6d4234a0afb3f37ecde4b546"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] typing = ["typing-extensions (>=4.8)"] [[package]] name = "flake8" version = "7.0.0" description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.8.1" files = [ {file = "flake8-7.0.0-py2.py3-none-any.whl", hash = "sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3"}, {file = "flake8-7.0.0.tar.gz", hash = "sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132"}, ] [package.dependencies] mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.11.0,<2.12.0" pyflakes = ">=3.2.0,<3.3.0" [[package]] name = "flake8-annotations" version = "3.0.1" description = "Flake8 Type Annotation Checks" optional = false python-versions = ">=3.8.1" files = [ {file = "flake8_annotations-3.0.1-py3-none-any.whl", hash = "sha256:af78e3216ad800d7e144745ece6df706c81b3255290cbf870e54879d495e8ade"}, {file = "flake8_annotations-3.0.1.tar.gz", hash = "sha256:ff37375e71e3b83f2a5a04d443c41e2c407de557a884f3300a7fa32f3c41cb0a"}, ] [package.dependencies] attrs = ">=21.4" flake8 = ">=5.0" [[package]] name = "flake8-bugbear" version = "24.2.6" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." optional = false python-versions = ">=3.8.1" files = [ {file = "flake8-bugbear-24.2.6.tar.gz", hash = "sha256:f9cb5f2a9e792dd80ff68e89a14c12eed8620af8b41a49d823b7a33064ac9658"}, {file = "flake8_bugbear-24.2.6-py3-none-any.whl", hash = "sha256:663ef5de80cd32aacd39d362212983bc4636435a6f83700b4ed35acbd0b7d1b8"}, ] [package.dependencies] attrs = ">=19.2.0" flake8 = ">=6.0.0" [package.extras] dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "pytest", "tox"] [[package]] name = "flake8-isort" version = "6.1.1" description = "flake8 plugin that integrates isort" optional = false python-versions = ">=3.8" files = [ {file = "flake8_isort-6.1.1-py3-none-any.whl", hash = "sha256:0fec4dc3a15aefbdbe4012e51d5531a2eb5fa8b981cdfbc882296a59b54ede12"}, {file = "flake8_isort-6.1.1.tar.gz", hash = "sha256:c1f82f3cf06a80c13e1d09bfae460e9666255d5c780b859f19f8318d420370b3"}, ] [package.dependencies] flake8 = "*" isort = ">=5.0.0,<6" [package.extras] test = ["pytest"] [[package]] name = "flake8-quotes" version = "3.4.0" description = "Flake8 lint for quotes." optional = false python-versions = "*" files = [ {file = "flake8-quotes-3.4.0.tar.gz", hash = "sha256:aad8492fb710a2d3eabe68c5f86a1428de650c8484127e14c43d0504ba30276c"}, ] [package.dependencies] flake8 = "*" setuptools = "*" [[package]] name = "flake8-use-fstring" version = "1.4" description = "Flake8 plugin for string formatting style." optional = false python-versions = ">=3.6" files = [ {file = "flake8-use-fstring-1.4.tar.gz", hash = "sha256:6550bf722585eb97dffa8343b0f1c372101f5c4ab5b07ebf0edd1c79880cdd39"}, ] [package.dependencies] flake8 = ">=3" [package.extras] ci = ["coverage (==4.*)", "coveralls", "flake8-builtins", "flake8-commas", "flake8-fixme", "flake8-print", "flake8-quotes", "flake8-todo", "pytest (>=4)", "pytest-cov (>=2)"] dev = ["coverage (==4.*)", "flake8-builtins", "flake8-commas", "flake8-fixme", "flake8-print", "flake8-quotes", "flake8-todo", "pytest (>=4)", "pytest-cov (>=2)"] test = ["coverage (==4.*)", "flake8-builtins", "flake8-commas", "flake8-fixme", "flake8-print", "flake8-quotes", "flake8-todo", "pytest (>=4)", "pytest-cov (>=2)"] [[package]] name = "isort" version = "5.13.2" description = "A Python utility / library to sort Python imports." optional = false python-versions = ">=3.8.0" files = [ {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, ] [package.extras] colors = ["colorama (>=0.4.6)"] [[package]] name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" optional = false python-versions = ">=3.6" files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] [[package]] name = "mypy" version = "1.9.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ {file = "mypy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f8a67616990062232ee4c3952f41c779afac41405806042a8126fe96e098419f"}, {file = "mypy-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d357423fa57a489e8c47b7c85dfb96698caba13d66e086b412298a1a0ea3b0ed"}, {file = "mypy-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49c87c15aed320de9b438ae7b00c1ac91cd393c1b854c2ce538e2a72d55df150"}, {file = "mypy-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:48533cdd345c3c2e5ef48ba3b0d3880b257b423e7995dada04248725c6f77374"}, {file = "mypy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:4d3dbd346cfec7cb98e6cbb6e0f3c23618af826316188d587d1c1bc34f0ede03"}, {file = "mypy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:653265f9a2784db65bfca694d1edd23093ce49740b2244cde583aeb134c008f3"}, {file = "mypy-1.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3a3c007ff3ee90f69cf0a15cbcdf0995749569b86b6d2f327af01fd1b8aee9dc"}, {file = "mypy-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2418488264eb41f69cc64a69a745fad4a8f86649af4b1041a4c64ee61fc61129"}, {file = "mypy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:68edad3dc7d70f2f17ae4c6c1b9471a56138ca22722487eebacfd1eb5321d612"}, {file = "mypy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:85ca5fcc24f0b4aeedc1d02f93707bccc04733f21d41c88334c5482219b1ccb3"}, {file = "mypy-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd"}, {file = "mypy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6"}, {file = "mypy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185"}, {file = "mypy-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913"}, {file = "mypy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6"}, {file = "mypy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e54396d70be04b34f31d2edf3362c1edd023246c82f1730bbf8768c28db5361b"}, {file = "mypy-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5e6061f44f2313b94f920e91b204ec600982961e07a17e0f6cd83371cb23f5c2"}, {file = "mypy-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a10926e5473c5fc3da8abb04119a1f5811a236dc3a38d92015cb1e6ba4cb9e"}, {file = "mypy-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b685154e22e4e9199fc95f298661deea28aaede5ae16ccc8cbb1045e716b3e04"}, {file = "mypy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:5d741d3fc7c4da608764073089e5f58ef6352bedc223ff58f2f038c2c4698a89"}, {file = "mypy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:587ce887f75dd9700252a3abbc9c97bbe165a4a630597845c61279cf32dfbf02"}, {file = "mypy-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f88566144752999351725ac623471661c9d1cd8caa0134ff98cceeea181789f4"}, {file = "mypy-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61758fabd58ce4b0720ae1e2fea5cfd4431591d6d590b197775329264f86311d"}, {file = "mypy-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e49499be624dead83927e70c756970a0bc8240e9f769389cdf5714b0784ca6bf"}, {file = "mypy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:571741dc4194b4f82d344b15e8837e8c5fcc462d66d076748142327626a1b6e9"}, {file = "mypy-1.9.0-py3-none-any.whl", hash = "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e"}, {file = "mypy-1.9.0.tar.gz", hash = "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974"}, ] [package.dependencies] mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = ">=4.1.0" [package.extras] dmypy = ["psutil (>=4.0)"] install-types = ["pip"] mypyc = ["setuptools (>=50)"] reports = ["lxml"] [[package]] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] [[package]] name = "packaging" version = "24.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, ] [[package]] name = "pep8-naming" version = "0.13.3" description = "Check PEP-8 naming conventions, plugin for flake8" optional = false python-versions = ">=3.7" files = [ {file = "pep8-naming-0.13.3.tar.gz", hash = "sha256:1705f046dfcd851378aac3be1cd1551c7c1e5ff363bacad707d43007877fa971"}, {file = "pep8_naming-0.13.3-py3-none-any.whl", hash = "sha256:1a86b8c71a03337c97181917e2b472f0f5e4ccb06844a0d6f0a33522549e7a80"}, ] [package.dependencies] flake8 = ">=5.0.0" [[package]] name = "platformdirs" version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false python-versions = ">=3.8" files = [ {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] [[package]] name = "pluggy" version = "1.4.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, ] [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] [[package]] name = "pycodestyle" version = "2.11.1" description = "Python style guide checker" optional = false python-versions = ">=3.8" files = [ {file = "pycodestyle-2.11.1-py2.py3-none-any.whl", hash = "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67"}, {file = "pycodestyle-2.11.1.tar.gz", hash = "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f"}, ] [[package]] name = "pyflakes" version = "3.2.0" description = "passive checker of Python programs" optional = false python-versions = ">=3.8" files = [ {file = "pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a"}, {file = "pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f"}, ] [[package]] name = "pyproject-api" version = "1.6.1" description = "API to interact with the python pyproject.toml based projects" optional = false python-versions = ">=3.8" files = [ {file = "pyproject_api-1.6.1-py3-none-any.whl", hash = "sha256:4c0116d60476b0786c88692cf4e325a9814965e2469c5998b830bba16b183675"}, {file = "pyproject_api-1.6.1.tar.gz", hash = "sha256:1817dc018adc0d1ff9ca1ed8c60e1623d5aaca40814b953af14a9cf9a5cae538"}, ] [package.dependencies] packaging = ">=23.1" tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [package.extras] docs = ["furo (>=2023.8.19)", "sphinx (<7.2)", "sphinx-autodoc-typehints (>=1.24)"] testing = ["covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "setuptools (>=68.1.2)", "wheel (>=0.41.2)"] [[package]] name = "setuptools" version = "69.2.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ {file = "setuptools-69.2.0-py3-none-any.whl", hash = "sha256:c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c"}, {file = "setuptools-69.2.0.tar.gz", hash = "sha256:0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "tomli" version = "2.0.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.7" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] [[package]] name = "tox" version = "4.14.2" description = "tox is a generic virtualenv management and test command line tool" optional = false python-versions = ">=3.8" files = [ {file = "tox-4.14.2-py3-none-any.whl", hash = "sha256:2900c4eb7b716af4a928a7fdc2ed248ad6575294ed7cfae2ea41203937422847"}, {file = "tox-4.14.2.tar.gz", hash = "sha256:0defb44f6dafd911b61788325741cc6b2e12ea71f987ac025ad4d649f1f1a104"}, ] [package.dependencies] cachetools = ">=5.3.2" chardet = ">=5.2" colorama = ">=0.4.6" filelock = ">=3.13.1" packaging = ">=23.2" platformdirs = ">=4.1" pluggy = ">=1.3" pyproject-api = ">=1.6.1" tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} virtualenv = ">=20.25" [package.extras] docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-argparse-cli (>=1.11.1)", "sphinx-autodoc-typehints (>=1.25.2)", "sphinx-copybutton (>=0.5.2)", "sphinx-inline-tabs (>=2023.4.21)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.11)"] testing = ["build[virtualenv] (>=1.0.3)", "covdefaults (>=2.3)", "detect-test-pollution (>=1.2)", "devpi-process (>=1)", "diff-cover (>=8.0.2)", "distlib (>=0.3.8)", "flaky (>=3.7)", "hatch-vcs (>=0.4)", "hatchling (>=1.21)", "psutil (>=5.9.7)", "pytest (>=7.4.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-xdist (>=3.5)", "re-assert (>=1.1)", "time-machine (>=2.13)", "wheel (>=0.42)"] [[package]] name = "types-setuptools" version = "69.2.0.20240317" description = "Typing stubs for setuptools" optional = false python-versions = ">=3.8" files = [ {file = "types-setuptools-69.2.0.20240317.tar.gz", hash = "sha256:b607c4c48842ef3ee49dc0c7fe9c1bad75700b071e1018bb4d7e3ac492d47048"}, {file = "types_setuptools-69.2.0.20240317-py3-none-any.whl", hash = "sha256:cf91ff7c87ab7bf0625c3f0d4d90427c9da68561f3b0feab77977aaf0bbf7531"}, ] [[package]] name = "typing-extensions" version = "4.10.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, ] [[package]] name = "virtualenv" version = "20.25.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ {file = "virtualenv-20.25.1-py3-none-any.whl", hash = "sha256:961c026ac520bac5f69acb8ea063e8a4f071bcc9457b9c1f28f6b085c511583a"}, {file = "virtualenv-20.25.1.tar.gz", hash = "sha256:e08e13ecdca7a0bd53798f356d5831434afa5b07b93f0abdf0797b7a06ffe197"}, ] [package.dependencies] distlib = ">=0.3.7,<1" filelock = ">=3.12.2,<4" platformdirs = ">=3.9.1,<5" [package.extras] docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] [metadata] lock-version = "2.0" python-versions = "^3.8" content-hash = "55042b7c7e55119c3f98df313b8147aae5be53f0619524390789c1a07ff76e37" requirements-parser-0.9.0/pyproject.toml000066400000000000000000000073211460322744000204560ustar00rootroot00000000000000[build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry] name = "requirements-parser" # !! version is managed by semantic_release version = "0.9.0" description = "This is a small Python module for parsing Pip requirement files." authors = [ "Paul Horton ", "David Fischer (@davidfischer)", "Trey Hunner (@treyhunner)", "Dima Veselov (@dveselov)", "Sascha Peilicke (@saschpe)", "Jayson Reis (@jaysonsantos)", "Max Shenfield (@mshenfield)", "Nicolas Delaby (@ticosax)", "Stéphane Bidoul (@sbidoul)" ] maintainers = ["Paul Horton "] license = "Apache-2.0" readme = "README.md" homepage = "https://github.com/madpah/requirements-parser/#readme" repository = "https://github.com/madpah/requirements-parser" documentation = "https://requirements-parser.readthedocs.io/" packages = [ { include = "requirements" }, { include = "tests", format = "sdist" }, ] include = [ { path = "AUTHORS.rst", format = "sdist" }, { path = "LICENSE", format = "sdist" }, { path = "README.md", format = "sdist" }, ] exclude = [ # exclude dotfiles and dotfolders "**/.*", "docs/_build", "docs/processes", ] classifiers = [ # Trove classifiers - https://packaging.python.org/specifications/core-metadata/#metadata-classifier # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Software Distribution', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Typing :: Typed' ] keywords = [ "Pip", "requirements", "parse" ] [tool.poetry.urls] "Bug Tracker" = "https://github.com/madpah/requirements-parser/issues" [tool.poetry.dependencies] python = "^3.8" types-setuptools = ">=69.1.0" [tool.poetry.group.dev.dependencies] coverage = "7.4.4" flake8 = { version="7.0.0", python=">=3.8.1" } flake8-annotations = { version="3.0.1", python=">=3.8.1" } flake8-bugbear = { version="24.2.6", python=">=3.8.1" } flake8-isort = "6.1.1" flake8-quotes = "3.4.0" flake8-use-fstring = "1.4" pep8-naming = "0.13.3" isort = "5.13.2" autopep8 = "2.1.0" mypy = "1.9.0" tox = "4.14.2" [tool.semantic_release] # see https://python-semantic-release.readthedocs.io/en/latest/configuration.html commit_author = "semantic-release " commit_message = "chore(release): {version}\n\nAutomatically generated by python-semantic-release\n\nSigned-off-by: semantic-release " upload_to_vcs_release = true build_command = "pip install poetry && poetry build" version_toml = ["pyproject.toml:tool.poetry.version"] version_variables = [ "requirements/__init__.py:__version__", "docs/conf.py:release", ] [tool.semantic_release.publish] dist_glob_patterns = ["dist/*"] upload_to_vcs_release = true [tool.semantic_release.changelog] changelog_file = "CHANGELOG.md" exclude_commit_patterns = [ "chore\\(release\\):", ] [tool.semantic_release.branches.main] match = "(main|master)" prerelease = false [tool.semantic_release.branches."step"] match = "(build|chore|ci|docs|feat|fix|perf|style|refactor|test)" prerelease = true prerelease_token = "alpha" [tool.semantic_release.branches."major-dev"] match = "(\\d+\\.0\\.0-(dev|rc)|dev/\\d+\\.0\\.0)" prerelease = true prerelease_token = "rc" requirements-parser-0.9.0/requirements/000077500000000000000000000000001460322744000202625ustar00rootroot00000000000000requirements-parser-0.9.0/requirements/__init__.py000066400000000000000000000015631460322744000224000ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 from .parser import parse __all__ = [ 'parse' ] # !! version is managed by semantic_release # do not use typing here, or else `semantic_release` might have issues finding the variable __version__ = "0.9.0" # noqa:Q000 requirements-parser-0.9.0/requirements/fragment.py000066400000000000000000000040111460322744000224330ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 import re from typing import Dict, List, Optional, Tuple, cast # Copied from pip # https://github.com/pypa/pip/blob/281eb61b09d87765d7c2b92f6982b3fe76ccb0af/pip/index.py#L947 HASH_ALGORITHMS = set(['sha1', 'sha224', 'sha384', 'sha256', 'sha512', 'md5']) extras_require_search = re.compile(r'(?P.+)\[(?P[^\]]+)\]') def parse_fragment(fragment_string: str) -> Dict[str, str]: """Takes a fragment string nd returns a dict of the components""" fragment_string = fragment_string.lstrip('#') try: return dict(cast(Tuple[str, str], tuple(key_value_string.split('='))) for key_value_string in fragment_string.split('&')) except ValueError: raise ValueError(f'Invalid fragment string {fragment_string}') def get_hash_info(d: Dict[str, str]) -> Tuple[Optional[str], Optional[str]]: """Returns the first matching hashlib name and value from a dict""" for key in d.keys(): if key.lower() in HASH_ALGORITHMS: return key, d[key] return None, None def parse_extras_require(egg: Optional[str]) -> Tuple[Optional[str], List[str]]: if egg is not None: match = extras_require_search.search(egg) if match is not None: name = match.group('name') extras = match.group('extras') return name, [extra.strip() for extra in extras.split(',')] return egg, [] requirements-parser-0.9.0/requirements/parser.py000066400000000000000000000066341460322744000221410ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 import os import warnings from typing import Iterator, TextIO, Union from .requirement import Requirement _UNSUPPORTED_OPTIONS = { '-c': 'Unused option -c (constraint). Skipping.', '--constraint': 'Unused option -c (constraint). Skipping.', '-r': 'Unused option -r (requirement). Skipping.', '--requirement': 'Unused option -r (requirement). Skipping.', '--no-binary': 'Unused option --no-binary. Skipping', '--only-binary': 'Unused option --only-binary. Skipping', '--prefer-binary': 'Unused option --prefer-binary. Skipping', '--require-hashes': 'Unused option --require-hashes. Skipping', '--pre': 'Unused option --pre. Skipping', '--trusted-host': 'Unused option --trusted-host. Skipping', '--use-feature': 'Unused option --use-feature. Skipping', '-Z': 'Unused option -Z (always-unzip). Skipping.', '--always-unzip': 'Unused option --always-unzip. Skipping.' } def parse(reqstr: Union[str, TextIO]) -> Iterator[Requirement]: """ Parse a requirements file into a list of Requirements See: pip/req.py:parse_requirements() :param reqstr: a string or file like object containing requirements :returns: a *generator* of Requirement objects """ filename = getattr(reqstr, 'name', None) # Python 3.x only if not isinstance(reqstr, str): reqstr = reqstr.read() for line in reqstr.splitlines(): line = line.strip() if line == '': continue elif not line or line.startswith('#'): # comments are lines that start with # only continue elif not line or line.startswith('--hash='): # hashes are lines that start with --hash= continue elif line.startswith(('-r', '--requirement')): _, new_filename = line.split() new_file_path = os.path.join(os.path.dirname(filename or '.'), new_filename) with open(new_file_path) as f: for requirement in parse(f): yield requirement elif line.startswith('-f') or line.startswith('--find-links') or \ line.startswith('-i') or line.startswith('--index-url') or \ line.startswith('--extra-index-url') or \ line.startswith('--no-index'): warnings.warn('Private repos not supported. Skipping.', stacklevel=2) continue else: unsupported: bool = False for param in _UNSUPPORTED_OPTIONS.keys(): if line.startswith(param): warnings.warn(str(_UNSUPPORTED_OPTIONS.get(param)), stacklevel=2) unsupported = True # Otherwise, parse it if not unsupported: yield Requirement.parse(line) requirements-parser-0.9.0/requirements/py.typed000066400000000000000000000014521460322744000217630ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 # Marker file for PEP 561. This package uses inline types. # This file is needed to allow other packages to type-check their code against this package. requirements-parser-0.9.0/requirements/requirement.py000066400000000000000000000242061460322744000232000ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 from __future__ import unicode_literals import re from typing import Any, Dict, List, Match, Optional, Tuple, cast from pkg_resources import Requirement as Req from .fragment import get_hash_info, parse_extras_require, parse_fragment from .vcs import VCS, VCS_SCHEMES URI_REGEX = re.compile( r'^(?Phttps?|file|ftps?)://(?P[^#]+)' r'(#(?P\S+))?' ) VCS_SCHEMES_REGEX = r'|'.join([scheme.replace('+', r'\+') for scheme in VCS_SCHEMES]) VCS_REGEX = re.compile( rf'^(?P{VCS_SCHEMES_REGEX})://((?P[^/@]+)@)?' r'(?P[^#@]+)(@(?P[^#]+))?(#(?P\S+))?' ) # This matches just about everything LOCAL_REGEX = re.compile(r'^((?Pfile)://)?(?P[^#]+)#(?P\S+)?') class Requirement: """ Represents a single requirement Typically instances of this class are created with ``Requirement.parse``. For local file requirements, there's no verification that the file exists. This class attempts to be *dict-like*. See: http://www.pip-installer.org/en/latest/logic.html **Members**: * ``line`` - the actual requirement line being parsed * ``editable`` - a boolean whether this requirement is "editable" * ``local_file`` - a boolean whether this requirement is a local file/path * ``specifier`` - a boolean whether this requirement used a requirement specifier (eg. "django>=1.5" or "requirements") * ``vcs`` - a string specifying the version control system * ``revision`` - a version control system specifier * ``name`` - the name of the requirement * ``uri`` - the URI if this requirement was specified by URI * ``subdirectory`` - the subdirectory fragment of the URI * ``path`` - the local path to the requirement * ``hash_name`` - the type of hashing algorithm indicated in the line * ``hash`` - the hash value indicated by the requirement line * ``extras`` - a list of extras for this requirement (eg. "mymodule[extra1, extra2]") * ``specs`` - a list of specs for this requirement (eg. "mymodule>1.5,<1.6" => [('>', '1.5'), ('<', '1.6')]) """ def __init__(self, line: str) -> None: # Do not call this private method self.line = line self.editable = False self.local_file = False self.specifier = False self.vcs = None self.name = None self.subdirectory = None self.uri = None self.path = None self.revision = None self.hash_name = None self.hash = None self.extras: List[str] = [] self.specs: List[Tuple[str, str]] = [] def __repr__(self) -> str: return f'' def __getitem__(self, key: str) -> Any: return getattr(self, key) def __eq__(self, other: object) -> bool: if isinstance(other, Requirement): return all([ self.name == other.name, set(self.specs) == set(other.specs), self.editable == other.editable, self.specifier == other.specifier, self.revision == other.revision, self.hash_name == other.hash_name, self.hash == other.hash, set(self.extras) == set(other.extras), ]) return False def __ne__(self, other: object) -> bool: return not self == other def keys(self) -> Any: return self.__dict__.keys() @classmethod def parse_editable(cls, line: str) -> 'Requirement': """ Parses a Requirement from an "editable" requirement which is either a local project path or a VCS project URI. See: pip/req.py:from_editable() :param line: an "editable" requirement :returns: a Requirement instance for the given line :raises: ValueError on an invalid requirement """ req = cls(f'-e {line}') req.editable = True if ' #' in line: line = line[:line.find(' #')] vcs_match: Optional[Match[str]] = VCS_REGEX.match(line) local_match: Optional[Match[str]] = LOCAL_REGEX.match(line) if vcs_match is not None: groups: Dict[str, str] = vcs_match.groupdict() if groups.get('login'): req.uri = f'{groups["scheme"]}://{groups["login"]}@{groups["path"]}' # type: ignore else: req.uri = f'{groups["scheme"]}://{groups["path"]}' # type: ignore req.revision = groups['revision'] # type: ignore if groups['fragment']: fragment = parse_fragment(groups['fragment']) egg = cast(str, fragment.get('egg')) req.name, req.extras = parse_extras_require(egg) # type: ignore req.hash_name, req.hash = get_hash_info(fragment) # type: ignore req.subdirectory = fragment.get('subdirectory') # type: ignore for vcs in VCS: if str(req.uri).startswith(vcs): req.vcs = vcs # type: ignore elif local_match is not None: groups = local_match.groupdict() req.local_file = True if groups['fragment']: fragment = parse_fragment(groups['fragment']) egg = cast(str, fragment.get('egg')) req.name, req.extras = parse_extras_require(egg) # type: ignore req.hash_name, req.hash = get_hash_info(fragment) # type: ignore req.subdirectory = fragment.get('subdirectory') # type: ignore req.path = cast(str, groups['path']) # type: ignore else: req.local_file = True req.path, req.name = line.rsplit('/', 1) # type: ignore return req @classmethod def parse_line(cls, line: str) -> 'Requirement': """ Parses a Requirement from a non-editable requirement. See: pip/req.py:from_line() :param line: a "non-editable" requirement :returns: a Requirement instance for the given line :raises: ValueError on an invalid requirement """ req = cls(line) vcs_match: Optional[Match[str]] = VCS_REGEX.match(line) uri_match: Optional[Match[str]] = URI_REGEX.match(line) local_match: Optional[Match[str]] = LOCAL_REGEX.match(line) if vcs_match is not None: groups = vcs_match.groupdict() if groups.get('login'): req.uri = f'{groups["scheme"]}://{groups["login"]}@{groups["path"]}' # type: ignore else: req.uri = f'{groups["scheme"]}://{groups["path"]}' # type: ignore req.revision = groups['revision'] # type: ignore if groups['fragment']: fragment = parse_fragment(groups['fragment']) egg = fragment.get('egg') req.name, req.extras = parse_extras_require(egg) # type: ignore req.hash_name, req.hash = get_hash_info(fragment) # type: ignore req.subdirectory = fragment.get('subdirectory') # type: ignore for vcs in VCS: if str(req.uri).startswith(vcs): req.vcs = vcs # type: ignore elif uri_match is not None: groups = uri_match.groupdict() req.uri = f'{groups["scheme"]}://{groups["path"]}' # type: ignore if groups['fragment']: fragment = parse_fragment(groups['fragment']) egg = fragment.get('egg') req.name, req.extras = parse_extras_require(egg) # type: ignore req.hash_name, req.hash = get_hash_info(fragment) # type: ignore req.subdirectory = fragment.get('subdirectory') # type: ignore if groups['scheme'] == 'file': req.local_file = True elif '#egg=' in line: # Assume a local file match assert local_match is not None, 'This should match everything' groups = local_match.groupdict() req.local_file = True if groups['fragment']: fragment = parse_fragment(groups['fragment']) egg = fragment.get('egg') name, extras = parse_extras_require(egg) req.name = fragment.get('egg') # type: ignore req.hash_name, req.hash = get_hash_info(fragment) # type: ignore req.subdirectory = fragment.get('subdirectory') # type: ignore req.path = groups['path'] # type: ignore else: # This is a requirement specifier. # Delegate to pkg_resources and hope for the best req.specifier = True pkg_req = Req.parse(line) req.name = pkg_req.unsafe_name # type: ignore req.extras = list(pkg_req.extras) req.specs = pkg_req.specs return req @classmethod def parse(cls, line: str) -> 'Requirement': """ Parses a Requirement from a line of a requirement file. :param line: a line of a requirement file :returns: a Requirement instance for the given line :raises: ValueError on an invalid requirement """ if line.startswith('-e') or line.startswith('--editable'): # Editable installs are either a local project path # or a VCS project URI return cls.parse_editable( re.sub(r'^(-e|--editable=?)\s*', '', line)) if ' --hash=' in line: line = line[:line.find(' --hash=')] if ' \\' in line: line = line[:line.find(' \\')] return cls.parse_line(line) requirements-parser-0.9.0/requirements/vcs.py000066400000000000000000000020471460322744000214320ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 from __future__ import unicode_literals VCS = [ 'git', 'hg', 'svn', 'bzr', ] VCS_SCHEMES = [ 'git', 'git+https', 'git+ssh', 'git+git', 'hg+http', 'hg+https', 'hg+static-http', 'hg+ssh', 'svn', 'svn+svn', 'svn+http', 'svn+https', 'svn+ssh', 'bzr+http', 'bzr+https', 'bzr+ssh', 'bzr+sftp', 'bzr+ftp', 'bzr+lp', ] requirements-parser-0.9.0/tests/000077500000000000000000000000001460322744000167015ustar00rootroot00000000000000requirements-parser-0.9.0/tests/__init__.py000066400000000000000000000012211460322744000210060ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 requirements-parser-0.9.0/tests/reqfiles/000077500000000000000000000000001460322744000205135ustar00rootroot00000000000000requirements-parser-0.9.0/tests/reqfiles/blank_1.expected000066400000000000000000000000021460322744000235350ustar00rootroot00000000000000[]requirements-parser-0.9.0/tests/reqfiles/blank_1.txt000066400000000000000000000000031460322744000225540ustar00rootroot00000000000000 requirements-parser-0.9.0/tests/reqfiles/comment_1.expected000066400000000000000000000000021460322744000241100ustar00rootroot00000000000000[]requirements-parser-0.9.0/tests/reqfiles/comment_1.txt000066400000000000000000000000241460322744000231320ustar00rootroot00000000000000# This is a comment requirements-parser-0.9.0/tests/reqfiles/comment_2.expected000066400000000000000000000004761460322744000241300ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "req", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "req==1.0 # comment", "hash_name": null, "hash": null, "specs": [ [ "==", "1.0" ] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/comment_2.txt000066400000000000000000000000261460322744000231350ustar00rootroot00000000000000req==1.0 # comment requirements-parser-0.9.0/tests/reqfiles/crateio_requirements.expected000066400000000000000000000501221460322744000264670ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "Babel", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Babel==0.9.6", "hash_name": null, "hash": null, "specs": [ [ "==", "0.9.6" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "Django", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Django==1.4", "hash_name": null, "hash": null, "specs": [ [ "==", "1.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "Jinja2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Jinja2==2.6", "hash_name": null, "hash": null, "specs": [ [ "==", "2.6" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "MarkupSafe", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "MarkupSafe==0.15", "hash_name": null, "hash": null, "specs": [ [ "==", "0.15" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "South", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "South==0.7.5", "hash_name": null, "hash": null, "specs": [ [ "==", "0.7.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "amqplib", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "amqplib==1.0.2", "hash_name": null, "hash": null, "specs": [ [ "==", "1.0.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "anyjson", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "anyjson==0.3.3", "hash_name": null, "hash": null, "specs": [ [ "==", "0.3.3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "bleach", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "bleach==1.1.1", "hash_name": null, "hash": null, "specs": [ [ "==", "1.1.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "boto", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "boto==2.3.0", "hash_name": null, "hash": null, "specs": [ [ "==", "2.3.0" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "celery", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "celery==2.5.5", "hash_name": null, "hash": null, "specs": [ [ "==", "2.5.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "celery-haystack", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "celery-haystack==0.4", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "certifi", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "certifi==0.0.8", "hash_name": null, "hash": null, "specs": [ [ "==", "0.0.8" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "chardet", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "chardet==1.0.1", "hash_name": null, "hash": null, "specs": [ [ "==", "1.0.1" ] ], "revision": null }, { "specifier": false, "local_file": false, "name": "crate.web", "editable": true, "subdirectory": null, "uri": "git+https://github.com/crateio/crate.web.git", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://github.com/crateio/crate.web.git#egg=crate.web", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "crate.pypi", "editable": true, "subdirectory": null, "uri": "git+https://github.com/crateio/crate.pypi.git", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://github.com/crateio/crate.pypi.git#egg=crate.pypi", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "eventlet", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "eventlet==0.9.16", "hash_name": null, "hash": null, "specs": [ [ "==", "0.9.16" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-admin-tools", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-admin-tools==0.4.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-appconf", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-appconf==0.5", "hash_name": null, "hash": null, "specs": [ [ "==", "0.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-celery", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-celery==2.5.5", "hash_name": null, "hash": null, "specs": [ [ "==", "2.5.5" ] ], "revision": null }, { "specifier": false, "local_file": false, "name": "django-haystack", "editable": true, "subdirectory": null, "uri": "git+https://github.com/toastdriven/django-haystack.git", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://github.com/toastdriven/django-haystack.git#egg=django-haystack", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "django-hosts", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-hosts==0.4.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-jsonfield", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-jsonfield==0.8.7", "hash_name": null, "hash": null, "specs": [ [ "==", "0.8.7" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-model-utils", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-model-utils==1.1.0", "hash_name": null, "hash": null, "specs": [ [ "==", "1.1.0" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-picklefield", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-picklefield==0.2.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.2.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-redis-cache", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-redis-cache==0.9.3", "hash_name": null, "hash": null, "specs": [ [ "==", "0.9.3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-secure", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-secure==0.1.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.1.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-social-auth", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-social-auth==0.6.9", "hash_name": null, "hash": null, "specs": [ [ "==", "0.6.9" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-staticfiles", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-staticfiles==1.2.1", "hash_name": null, "hash": null, "specs": [ [ "==", "1.2.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-storages", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-storages==1.1.4", "hash_name": null, "hash": null, "specs": [ [ "==", "1.1.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-tastypie", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-tastypie==0.9.11", "hash_name": null, "hash": null, "specs": [ [ "==", "0.9.11" ] ], "revision": null }, { "specifier": false, "local_file": false, "name": "django-user-accounts", "editable": true, "subdirectory": null, "uri": "git://github.com/dstufft/django-user-accounts.git", "extras": [], "vcs": "git", "path": null, "line": "-e git://github.com/dstufft/django-user-accounts.git#egg=django-user-accounts", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "django-uuidfield", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-uuidfield==0.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "docutils", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "docutils==0.9.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.9.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "greenlet", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "greenlet==0.4.0", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4.0" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "gunicorn", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "gunicorn==0.14.5", "hash_name": null, "hash": null, "specs": [ [ "==", "0.14.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "html5lib", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "html5lib==0.95", "hash_name": null, "hash": null, "specs": [ [ "==", "0.95" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "httplib2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "httplib2==0.7.4", "hash_name": null, "hash": null, "specs": [ [ "==", "0.7.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "isoweek", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "isoweek==1.2.0", "hash_name": null, "hash": null, "specs": [ [ "==", "1.2.0" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "jingo", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "jingo==0.4", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4" ] ], "revision": null }, { "specifier": false, "local_file": false, "name": "jutils", "editable": true, "subdirectory": null, "uri": "git+https://github.com/dstufft/jutils.git", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://github.com/dstufft/jutils.git#egg=jutils", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "kombu", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "kombu==2.1.8", "hash_name": null, "hash": null, "specs": [ [ "==", "2.1.8" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "lxml", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "lxml==2.3.4", "hash_name": null, "hash": null, "specs": [ [ "==", "2.3.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "mimeparse", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "mimeparse==0.1.3", "hash_name": null, "hash": null, "specs": [ [ "==", "0.1.3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "newrelic", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "newrelic==1.2.1.265", "hash_name": null, "hash": null, "specs": [ [ "==", "1.2.1.265" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "oauth2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "oauth2==1.5.211", "hash_name": null, "hash": null, "specs": [ [ "==", "1.5.211" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "oauthlib", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "oauthlib==0.1.3", "hash_name": null, "hash": null, "specs": [ [ "==", "0.1.3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "pinax-utils", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "pinax-utils==1.0b1.dev3", "hash_name": null, "hash": null, "specs": [ [ "==", "1.0b1.dev3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "psycopg2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "psycopg2==2.4.5", "hash_name": null, "hash": null, "specs": [ [ "==", "2.4.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "py-bcrypt", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "py-bcrypt==0.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "pyasn1", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "pyasn1==0.1.3", "hash_name": null, "hash": null, "specs": [ [ "==", "0.1.3" ] ], "revision": null }, { "specifier": false, "local_file": false, "name": "pyelasticsearch", "editable": true, "subdirectory": null, "uri": "git+https://github.com/toastdriven/pyelasticsearch.git", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://github.com/toastdriven/pyelasticsearch.git#egg=pyelasticsearch", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "python-dateutil", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "python-dateutil==1.5", "hash_name": null, "hash": null, "specs": [ [ "==", "1.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "python-openid", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "python-openid==2.2.5", "hash_name": null, "hash": null, "specs": [ [ "==", "2.2.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "pytz", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "pytz==2012c", "hash_name": null, "hash": null, "specs": [ [ "==", "2012c" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "PyYAML", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "PyYAML==3.10", "hash_name": null, "hash": null, "specs": [ [ "==", "3.10" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "raven", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "raven==1.7.6", "hash_name": null, "hash": null, "specs": [ [ "==", "1.7.6" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "redis", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "redis==2.4.12", "hash_name": null, "hash": null, "specs": [ [ "==", "2.4.12" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "requests", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "requests==0.12.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.12.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "rsa", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "rsa==3.0.1", "hash_name": null, "hash": null, "specs": [ [ "==", "3.0.1" ] ], "revision": null }, { "specifier": false, "local_file": false, "name": "saved_searches", "editable": true, "subdirectory": null, "uri": "git+https://github.com/toastdriven/saved_searches.git", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://github.com/toastdriven/saved_searches.git#egg=saved_searches", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "simplejson", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "simplejson==2.5.2", "hash_name": null, "hash": null, "specs": [ [ "==", "2.5.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "slumber", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "slumber==0.4.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "uuid", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "uuid==1.30", "hash_name": null, "hash": null, "specs": [ [ "==", "1.30" ] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/crateio_requirements.txt000066400000000000000000000055051460322744000255120ustar00rootroot00000000000000# Copyright (c) 2012, Crate and individual contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --extra-index-url=http://dist.pinaxproject.com/dev/ Babel==0.9.6 Django==1.4 Jinja2==2.6 MarkupSafe==0.15 South==0.7.5 amqplib==1.0.2 anyjson==0.3.3 bleach==1.1.1 boto==2.3.0 celery==2.5.5 celery-haystack==0.4 certifi==0.0.8 chardet==1.0.1 -e git+https://github.com/crateio/crate.web.git#egg=crate.web -e git+https://github.com/crateio/crate.pypi.git#egg=crate.pypi eventlet==0.9.16 django-admin-tools==0.4.1 django-appconf==0.5 django-celery==2.5.5 -e git+https://github.com/toastdriven/django-haystack.git#egg=django-haystack django-hosts==0.4.2 django-jsonfield==0.8.7 django-model-utils==1.1.0 django-picklefield==0.2.1 django-redis-cache==0.9.3 django-secure==0.1.2 django-social-auth==0.6.9 django-staticfiles==1.2.1 django-storages==1.1.4 django-tastypie==0.9.11 -e git://github.com/dstufft/django-user-accounts.git#egg=django-user-accounts django-uuidfield==0.2 docutils==0.9.1 greenlet==0.4.0 gunicorn==0.14.5 html5lib==0.95 httplib2==0.7.4 isoweek==1.2.0 jingo==0.4 -e git+https://github.com/dstufft/jutils.git#egg=jutils kombu==2.1.8 lxml==2.3.4 mimeparse==0.1.3 newrelic==1.2.1.265 oauth2==1.5.211 oauthlib==0.1.3 pinax-utils==1.0b1.dev3 psycopg2==2.4.5 py-bcrypt==0.2 pyasn1==0.1.3 -e git+https://github.com/toastdriven/pyelasticsearch.git#egg=pyelasticsearch python-dateutil==1.5 python-openid==2.2.5 pytz==2012c PyYAML==3.10 raven==1.7.6 redis==2.4.12 requests==0.12.1 rsa==3.0.1 -e git+https://github.com/toastdriven/saved_searches.git#egg=saved_searches simplejson==2.5.2 slumber==0.4.2 uuid==1.30 requirements-parser-0.9.0/tests/reqfiles/editable_1.expected000066400000000000000000000034321460322744000242310ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "svn+svn://svn.myproject.org/svn/MyProject", "extras": [], "vcs": "svn", "path": null, "line": "-e svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "-e git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "da39a3ee5e6b4b0d3255bfef95601890afd80709" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject/", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+http://hg.myproject.org/MyProject/@special_feature#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "special_feature" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "bzr+lp://MyProject", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+lp://MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": true, "name": "package_name", "editable": true, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": "path/to/local", "line": "-e path/to/local/package_name", "hash_name": null, "hash": null, "specs": [], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/editable_1.txt000066400000000000000000000004641460322744000232510ustar00rootroot00000000000000-e svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject --editable git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject --editable hg+http://hg.myproject.org/MyProject/@special_feature#egg=MyProject -e bzr+lp://MyProject#egg=MyProject -e path/to/local/package_name requirements-parser-0.9.0/tests/reqfiles/editable_2.expected000066400000000000000000000030341460322744000242300ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "uri": "svn+svn://svn.myproject.org/svn/MyProject", "extras": [], "vcs": "svn", "path": null, "line": "-e svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject # Test comment", "specs": [], "revision": null, "hash": null, "hash_name": null, "subdirectory": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "-e git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject # Test comment", "specs": [], "revision": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "hash": null, "hash_name": null, "subdirectory": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "uri": "hg+http://hg.myproject.org/MyProject/", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+http://hg.myproject.org/MyProject/@special_feature#egg=MyProject # Test comment", "specs": [], "revision": "special_feature", "hash": null, "hash_name": null, "subdirectory": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "uri": "bzr+lp://MyProject", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+lp://MyProject#egg=MyProject # Test comment", "specs": [], "revision": null, "hash": null, "hash_name": null, "subdirectory": null } ] requirements-parser-0.9.0/tests/reqfiles/editable_2.txt000066400000000000000000000005221460322744000232450ustar00rootroot00000000000000-e svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject # Test comment --editable git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject # Test comment --editable hg+http://hg.myproject.org/MyProject/@special_feature#egg=MyProject # Test comment -e bzr+lp://MyProject#egg=MyProject # Test comment requirements-parser-0.9.0/tests/reqfiles/extras_1.expected000066400000000000000000000011731460322744000237660ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "MyPackage", "editable": false, "subdirectory": null, "uri": null, "extras": [ "pdf" ], "vcs": null, "path": null, "line": "MyPackage[PDF]==3.0", "hash_name": null, "hash": null, "specs": [ [ "==", "3.0" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "Fizzy", "editable": false, "subdirectory": null, "uri": null, "extras": [ "bar", "foo" ], "vcs": null, "path": null, "line": "Fizzy [foo, bar]", "hash_name": null, "hash": null, "specs": [], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/extras_1.txt000066400000000000000000000000451460322744000230010ustar00rootroot00000000000000MyPackage[PDF]==3.0 Fizzy [foo, bar] requirements-parser-0.9.0/tests/reqfiles/fail_1.txt000066400000000000000000000000301460322744000224000ustar00rootroot00000000000000test>>1.2.0 test=>1.2.0 requirements-parser-0.9.0/tests/reqfiles/fail_2.txt000066400000000000000000000000721460322744000224070ustar00rootroot00000000000000novcs+http://example.com#egg=a svn+http://example.com#egg requirements-parser-0.9.0/tests/reqfiles/file_1.expected000066400000000000000000000024731460322744000234030ustar00rootroot00000000000000[ { "specifier": false, "local_file": true, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "file:///path/to/your/lib/project", "extras": [], "vcs": null, "path": null, "line": "file:///path/to/your/lib/project#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": true, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "file://../../lib/project", "extras": [], "vcs": null, "path": null, "line": "file://../../lib/project#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": true, "name": "SomeOtherProject", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": "path/to/SomeProject", "line": "path/to/SomeProject#egg=SomeOtherProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "editable": true, "subdirectory": null, "extras": [], "line": "-e path/to/AnotherProject#egg=AnotherProject", "hash_name": null, "hash": null, "local_file": true, "name": "AnotherProject", "path": "path/to/AnotherProject", "revision": null, "specifier": false, "specs": [], "uri": null, "vcs": null } ] requirements-parser-0.9.0/tests/reqfiles/file_1.txt000066400000000000000000000002541460322744000224140ustar00rootroot00000000000000file:///path/to/your/lib/project#egg=MyProject file://../../lib/project#egg=MyProject path/to/SomeProject#egg=SomeOtherProject -e path/to/AnotherProject#egg=AnotherProject requirements-parser-0.9.0/tests/reqfiles/global_options_requirements.expected000066400000000000000000000004671460322744000300630ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "six", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "six==1.16.0", "hash_name": null, "hash": null, "specs": [ [ "==", "1.16.0" ] ], "revision": null } ]requirements-parser-0.9.0/tests/reqfiles/global_options_requirements.txt000066400000000000000000000002501460322744000270670ustar00rootroot00000000000000-i https://pypi.org/simple -c -f /my/local/archives --find-links /my/local/archives --no-binary :none: --only-binary :all: --prefer-binary --require-hashes six==1.16.0requirements-parser-0.9.0/tests/reqfiles/hash_1.expected000066400000000000000000000011731460322744000234030ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "packaging", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "packaging==21.3", "hash_name": null, "hash": null, "specs": [ [ "==", "21.3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "packaging", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "packaging==21.3", "hash_name": null, "hash": null, "specs": [ [ "==", "21.3" ] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/hash_1.txt000066400000000000000000000006021460322744000224150ustar00rootroot00000000000000packaging==21.3 \ --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 \ --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 # testing packaging==21.3 \ --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 \ --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 requirements-parser-0.9.0/tests/reqfiles/hash_2.expected000066400000000000000000000004771460322744000234120ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "packaging", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "packaging==21.3", "hash_name": null, "hash": null, "specs": [ [ "==", "21.3" ] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/hash_2.txt000066400000000000000000000001371460322744000224210ustar00rootroot00000000000000packaging==21.3 --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 requirements-parser-0.9.0/tests/reqfiles/illustrative_requirements.expected000066400000000000000000000024451460322744000275750ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "requirements", "editable": true, "subdirectory": null, "uri": "git+https://github.com/davidfischer/requirements-parser.git", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://github.com/davidfischer/requirements-parser.git#egg=requirements", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "Django", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Django >=1.5, <1.6", "hash_name": null, "hash": null, "specs": [ [ "<", "1.6" ], [ ">=", "1.5" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "numpy", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "numpy", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "DocParser", "editable": false, "subdirectory": null, "uri": null, "extras": [ "pdf" ], "vcs": null, "path": null, "line": "DocParser [PDF]", "hash_name": null, "hash": null, "specs": [], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/illustrative_requirements.txt000066400000000000000000000001711460322744000266050ustar00rootroot00000000000000-e git+https://github.com/davidfischer/requirements-parser.git#egg=requirements Django >=1.5, <1.6 numpy DocParser [PDF] requirements-parser-0.9.0/tests/reqfiles/recursive_1.expected000066400000000000000000000016641460322744000244740ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "ipdb", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "ipdb", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "Jinja", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Jinja", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "Django", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Django==1.6", "hash_name": null, "hash": null, "specs": [ [ "==", "1.6" ] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/recursive_1.txt000066400000000000000000000000361460322744000235020ustar00rootroot00000000000000-r recursive_2.txt Django==1.6requirements-parser-0.9.0/tests/reqfiles/recursive_2.expected000066400000000000000000000011231460322744000244630ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "ipdb", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "ipdb", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "Jinja", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Jinja", "hash_name": null, "hash": null, "specs": [], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/recursive_2.txt000066400000000000000000000000301460322744000234750ustar00rootroot00000000000000-r recursive_3.txt Jinjarequirements-parser-0.9.0/tests/reqfiles/recursive_3.expected000066400000000000000000000005471460322744000244750ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "ipdb", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "ipdb", "hash_name": null, "hash": null, "specs": [], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/recursive_3.txt000066400000000000000000000000041460322744000234770ustar00rootroot00000000000000ipdbrequirements-parser-0.9.0/tests/reqfiles/rtfd_deploy_requirements.expected000066400000000000000000000025531460322744000273610ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "psycopg2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "psycopg2", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "gunicorn", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "gunicorn", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "pysolr", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "pysolr", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "python-memcached", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "python-memcached", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "dnspython", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "dnspython", "hash_name": null, "hash": null, "specs": [], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/rtfd_deploy_requirements.txt000066400000000000000000000022401460322744000263700ustar00rootroot00000000000000# Copyright (c) 2011 Charles Leifer, Eric Holscher, Bobby Grace # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, # copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following # conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. psycopg2 gunicorn pysolr python-memcached dnspython requirements-parser-0.9.0/tests/reqfiles/rtfd_requirements.expected000066400000000000000000000252151460322744000260050ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "Distutils2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Distutils2==1.0a3", "hash_name": null, "hash": null, "specs": [ [ "==", "1.0a3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "Sphinx", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Sphinx==1.1.2", "hash_name": null, "hash": null, "specs": [ [ "==", "1.1.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "Unipath", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Unipath==0.2.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.2.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "bzr", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "bzr==2.5b4", "hash_name": null, "hash": null, "specs": [ [ "==", "2.5b4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "celery-haystack", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "celery-haystack==0.6.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.6.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "celery", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "celery==3.0.9", "hash_name": null, "hash": null, "specs": [ [ "==", "3.0.9" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-celery", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-celery==3.0.9", "hash_name": null, "hash": null, "specs": [ [ "==", "3.0.9" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-extensions", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-extensions==0.7.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.7.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-guardian", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-guardian==1.0.4", "hash_name": null, "hash": null, "specs": [ [ "==", "1.0.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-kombu", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-kombu==0.9.4", "hash_name": null, "hash": null, "specs": [ [ "==", "0.9.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-profiles", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-profiles==0.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django-secure", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django-secure==0.1.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.1.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "django", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "django==1.4.2", "hash_name": null, "hash": null, "specs": [ [ "==", "1.4.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "docutils", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "docutils==0.8.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.8.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "github2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "github2==0.5.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.5.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "httplib2", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "httplib2==0.7.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.7.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "mercurial", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "mercurial==2.4", "hash_name": null, "hash": null, "specs": [ [ "==", "2.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "mimeparse", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "mimeparse==0.1.3", "hash_name": null, "hash": null, "specs": [ [ "==", "0.1.3" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "redis", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "redis==2.7.1", "hash_name": null, "hash": null, "specs": [ [ "==", "2.7.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "simplejson", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "simplejson==2.3.0", "hash_name": null, "hash": null, "specs": [ [ "==", "2.3.0" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "slumber", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "slumber==0.4.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "south", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "south==0.7.6", "hash_name": null, "hash": null, "specs": [ [ "==", "0.7.6" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "sphinx-http-domain", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "sphinx-http-domain==0.2", "hash_name": null, "hash": null, "specs": [ [ "==", "0.2" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "unittest-xml-reporting", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "unittest-xml-reporting==1.3.1", "hash_name": null, "hash": null, "specs": [ [ "==", "1.3.1" ] ], "revision": null }, { "specifier": false, "local_file": false, "name": "django_haystack", "editable": false, "subdirectory": null, "uri": "git+git://github.com/toastdriven/django-haystack", "extras": [], "vcs": "git", "path": null, "line": "git+git://github.com/toastdriven/django-haystack@259274e4127f723d76b893c87a82777f9490b960#egg=django_haystack", "hash_name": null, "hash": null, "specs": [], "revision": "259274e4127f723d76b893c87a82777f9490b960" }, { "specifier": false, "local_file": false, "name": "django-filter", "editable": false, "subdirectory": null, "uri": "git+git://github.com/alex/django-filter.git", "extras": [], "vcs": "git", "path": null, "line": "git+git://github.com/alex/django-filter.git#egg=django-filter", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "django_taggit-dev", "editable": false, "subdirectory": null, "uri": "git+git://github.com/alex/django-taggit.git", "extras": [], "vcs": "git", "path": null, "line": "git+git://github.com/alex/django-taggit.git@36f6dabcf10e27c7d9442a94243d4189f2a4f121#egg=django_taggit-dev", "hash_name": null, "hash": null, "specs": [], "revision": "36f6dabcf10e27c7d9442a94243d4189f2a4f121" }, { "specifier": false, "local_file": false, "name": "django_pagination-dev", "editable": false, "subdirectory": null, "uri": "git+git://github.com/ericflo/django-pagination.git", "extras": [], "vcs": "git", "path": null, "line": "git+git://github.com/ericflo/django-pagination.git@e5f669036c#egg=django_pagination-dev", "hash_name": null, "hash": null, "specs": [], "revision": "e5f669036c" }, { "specifier": false, "local_file": false, "name": "django_basic_apps-dev", "editable": false, "subdirectory": null, "uri": "git+git://github.com/nathanborror/django-basic-apps.git", "extras": [], "vcs": "git", "path": null, "line": "git+git://github.com/nathanborror/django-basic-apps.git@171fdbe21a0dbbb38919a383cc265cb3cbc73771#egg=django_basic_apps-dev", "hash_name": null, "hash": null, "specs": [], "revision": "171fdbe21a0dbbb38919a383cc265cb3cbc73771" }, { "specifier": false, "local_file": false, "name": "django_registration-dev", "editable": false, "subdirectory": null, "uri": "git+git://github.com/nathanborror/django-registration.git", "extras": [], "vcs": "git", "path": null, "line": "git+git://github.com/nathanborror/django-registration.git@dc0b564b7bfb79f58592fe8ad836729a85ec17ae#egg=django_registration-dev", "hash_name": null, "hash": null, "specs": [], "revision": "dc0b564b7bfb79f58592fe8ad836729a85ec17ae" }, { "specifier": false, "local_file": false, "name": "django_tastypie-dev", "editable": false, "subdirectory": null, "uri": "git+git://github.com/toastdriven/django-tastypie.git", "extras": [], "vcs": "git", "path": null, "line": "git+git://github.com/toastdriven/django-tastypie.git@c5451b90b18b0cb64841b2276d543230d5f58231#egg=django_tastypie-dev", "hash_name": null, "hash": null, "specs": [], "revision": "c5451b90b18b0cb64841b2276d543230d5f58231" } ] requirements-parser-0.9.0/tests/reqfiles/rtfd_requirements.txt000066400000000000000000000044451460322744000250250ustar00rootroot00000000000000# Copyright (c) 2011 Charles Leifer, Eric Holscher, Bobby Grace # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, # copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following # conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # Pypi ftw. Distutils2==1.0a3 Sphinx==1.1.2 Unipath==0.2.1 bzr==2.5b4 celery-haystack==0.6.2 celery==3.0.9 django-celery==3.0.9 django-extensions==0.7.1 django-guardian==1.0.4 django-kombu==0.9.4 django-profiles==0.2 django-secure==0.1.2 django==1.4.2 docutils==0.8.1 github2==0.5.2 httplib2==0.7.2 mercurial==2.4 mimeparse==0.1.3 redis==2.7.1 simplejson==2.3.0 slumber==0.4.2 south==0.7.6 sphinx-http-domain==0.2 unittest-xml-reporting==1.3.1 # Pegged git requirements git+git://github.com/toastdriven/django-haystack@259274e4127f723d76b893c87a82777f9490b960#egg=django_haystack git+git://github.com/alex/django-filter.git#egg=django-filter git+git://github.com/alex/django-taggit.git@36f6dabcf10e27c7d9442a94243d4189f2a4f121#egg=django_taggit-dev git+git://github.com/ericflo/django-pagination.git@e5f669036c#egg=django_pagination-dev git+git://github.com/nathanborror/django-basic-apps.git@171fdbe21a0dbbb38919a383cc265cb3cbc73771#egg=django_basic_apps-dev git+git://github.com/nathanborror/django-registration.git@dc0b564b7bfb79f58592fe8ad836729a85ec17ae#egg=django_registration-dev git+git://github.com/toastdriven/django-tastypie.git@c5451b90b18b0cb64841b2276d543230d5f58231#egg=django_tastypie-dev requirements-parser-0.9.0/tests/reqfiles/simple_1.expected000066400000000000000000000023321460322744000237470ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "z3c.checkversions", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "z3c.checkversions==0.4.1", "hash_name": null, "hash": null, "specs": [ [ "==", "0.4.1" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "MyPackage", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "MyPackage", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": true, "local_file": false, "name": "Framework", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Framework==0.9.4", "hash_name": null, "hash": null, "specs": [ [ "==", "0.9.4" ] ], "revision": null }, { "specifier": true, "local_file": false, "name": "Library", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "Library>=0.2", "hash_name": null, "hash": null, "specs": [ [ ">=", "0.2" ] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/simple_1.txt000066400000000000000000000001011460322744000227550ustar00rootroot00000000000000z3c.checkversions==0.4.1 MyPackage Framework==0.9.4 Library>=0.2 requirements-parser-0.9.0/tests/reqfiles/specs_1.expected000066400000000000000000000006301460322744000235720ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "PickyThing", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1", "hash_name": null, "hash": null, "specs": [ ["!=", "1.9.6"], ["<", "1.6"], ["<", "2.0a0"], ["==", "2.4c1"], [">", "1.9"] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/specs_1.txt000066400000000000000000000000531460322744000226070ustar00rootroot00000000000000PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1 requirements-parser-0.9.0/tests/reqfiles/subdirectory.expected000066400000000000000000000013671460322744000247630ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": "setup", "uri": "git+git://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "-e git+git://git.myproject.org/MyProject#egg=MyProject&subdirectory=setup", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": "setup", "uri": "git+git://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "git+git://git.myproject.org/MyProject#egg=MyProject&subdirectory=setup", "hash_name": null, "hash": null, "specs": [], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/subdirectory.txt000066400000000000000000000002211460322744000237650ustar00rootroot00000000000000-e git+git://git.myproject.org/MyProject#egg=MyProject&subdirectory=setup git+git://git.myproject.org/MyProject#egg=MyProject&subdirectory=setup requirements-parser-0.9.0/tests/reqfiles/underscores.expected000066400000000000000000000004611460322744000245730ustar00rootroot00000000000000[ { "specifier": true, "local_file": false, "name": "a_b", "editable": false, "subdirectory": null, "uri": null, "extras": [], "vcs": null, "path": null, "line": "a_b>=1.0", "hash_name": null, "hash": null, "specs": [ [ ">=", "1.0" ] ], "revision": null } ] requirements-parser-0.9.0/tests/reqfiles/underscores.txt000066400000000000000000000000111460322744000236000ustar00rootroot00000000000000a_b>=1.0 requirements-parser-0.9.0/tests/reqfiles/uri.expected000066400000000000000000000016361460322744000230430ustar00rootroot00000000000000[ { "editable": false, "extras": [], "line": "http://pypi.python.org/packages/source/p/pytz/pytz-2016.4.tar.gz#md5=a3316cf3842ed0375ba5931914239d97", "hash_name": "md5", "hash": "a3316cf3842ed0375ba5931914239d97", "local_file": false, "name": null, "path": null, "revision": null, "specifier": false, "specs": [], "subdirectory": null, "uri": "http://pypi.python.org/packages/source/p/pytz/pytz-2016.4.tar.gz", "vcs": null }, { "editable": false, "extras": [], "line": "http://pypi.python.org/packages/source/f/flask/Flask-0.11.1.tar.gz#sha256=1212aaf123911123babc024abaa&egg=Flask", "hash_name": "sha256", "hash": "1212aaf123911123babc024abaa", "local_file": false, "name": "Flask", "path": null, "revision": null, "specifier": false, "specs": [], "subdirectory": null, "uri": "http://pypi.python.org/packages/source/f/flask/Flask-0.11.1.tar.gz", "vcs": null } ] requirements-parser-0.9.0/tests/reqfiles/uri.txt000066400000000000000000000003261460322744000220540ustar00rootroot00000000000000http://pypi.python.org/packages/source/p/pytz/pytz-2016.4.tar.gz#md5=a3316cf3842ed0375ba5931914239d97 http://pypi.python.org/packages/source/f/flask/Flask-0.11.1.tar.gz#sha256=1212aaf123911123babc024abaa&egg=Flask requirements-parser-0.9.0/tests/reqfiles/vcs_bzr.expected000066400000000000000000000105771460322744000237200ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "bzr+http://bzr.myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+http://bzr.myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "bzr+sftp://user@myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+sftp://user@myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "bzr+ssh://user@myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+ssh://user@myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "bzr+ftp://user@myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+ftp://user@myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "bzr+https://bzr.myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+https://bzr.myproject.org/MyProject/trunk@2019#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "2019" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "bzr+http://bzr.myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "-e bzr+http://bzr.myproject.org/MyProject/trunk@v1.0#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "v1.0" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "bzr+http://bzr.myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "bzr+http://bzr.myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "bzr+sftp://user@myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "bzr+sftp://user@myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "bzr+ssh://user@myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "bzr+ssh://user@myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "bzr+ftp://user@myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "bzr+ftp://user@myproject.org/MyProject/trunk#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "bzr+https://bzr.myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "bzr+https://bzr.myproject.org/MyProject/trunk@2019#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "2019" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "bzr+http://bzr.myproject.org/MyProject/trunk", "extras": [], "vcs": "bzr", "path": null, "line": "bzr+http://bzr.myproject.org/MyProject/trunk@v1.0#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "v1.0" } ] requirements-parser-0.9.0/tests/reqfiles/vcs_bzr.txt000066400000000000000000000013571460322744000227320ustar00rootroot00000000000000-e bzr+http://bzr.myproject.org/MyProject/trunk#egg=MyProject -e bzr+sftp://user@myproject.org/MyProject/trunk#egg=MyProject -e bzr+ssh://user@myproject.org/MyProject/trunk#egg=MyProject -e bzr+ftp://user@myproject.org/MyProject/trunk#egg=MyProject -e bzr+https://bzr.myproject.org/MyProject/trunk@2019#egg=MyProject -e bzr+http://bzr.myproject.org/MyProject/trunk@v1.0#egg=MyProject bzr+http://bzr.myproject.org/MyProject/trunk#egg=MyProject bzr+sftp://user@myproject.org/MyProject/trunk#egg=MyProject bzr+ssh://user@myproject.org/MyProject/trunk#egg=MyProject bzr+ftp://user@myproject.org/MyProject/trunk#egg=MyProject bzr+https://bzr.myproject.org/MyProject/trunk@2019#egg=MyProject bzr+http://bzr.myproject.org/MyProject/trunk@v1.0#egg=MyProject requirements-parser-0.9.0/tests/reqfiles/vcs_git.expected000066400000000000000000000113521460322744000236760ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git+git://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "-e git+git://git.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git+https://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "-e git+https://git.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git+ssh://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "-e git+ssh://git.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git+ssh://git@git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "-e git+ssh://git@git.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "-e git://git.myproject.org/MyProject.git@master#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "master" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "-e git://git.myproject.org/MyProject.git@v1.0#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "v1.0" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "-e git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "da39a3ee5e6b4b0d3255bfef95601890afd80709" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "git+git://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "git+git://git.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "git+https://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "git+https://git.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "git+ssh://git.myproject.org/MyProject", "extras": [], "vcs": "git", "path": null, "line": "git+ssh://git.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "git://git.myproject.org/MyProject.git@master#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "master" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "git://git.myproject.org/MyProject.git@v1.0#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "v1.0" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "git://git.myproject.org/MyProject.git", "extras": [], "vcs": "git", "path": null, "line": "git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "da39a3ee5e6b4b0d3255bfef95601890afd80709" } ] requirements-parser-0.9.0/tests/reqfiles/vcs_git.txt000066400000000000000000000014541460322744000227160ustar00rootroot00000000000000-e git+git://git.myproject.org/MyProject#egg=MyProject -e git+https://git.myproject.org/MyProject#egg=MyProject -e git+ssh://git.myproject.org/MyProject#egg=MyProject -e git+ssh://git@git.myproject.org/MyProject#egg=MyProject -e git://git.myproject.org/MyProject.git@master#egg=MyProject -e git://git.myproject.org/MyProject.git@v1.0#egg=MyProject -e git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject git+git://git.myproject.org/MyProject#egg=MyProject git+https://git.myproject.org/MyProject#egg=MyProject git+ssh://git.myproject.org/MyProject#egg=MyProject git://git.myproject.org/MyProject.git@master#egg=MyProject git://git.myproject.org/MyProject.git@v1.0#egg=MyProject git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject requirements-parser-0.9.0/tests/reqfiles/vcs_git_extras_require.expected000066400000000000000000000006151460322744000270200ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "git+https://git.myproject.org/MyProject.git", "extras": ["security"], "vcs": "git", "path": null, "line": "git+https://git.myproject.org/MyProject.git@v0.1#egg=MyProject[security]", "hash_name": null, "hash": null, "specs": [], "revision": "v0.1" } ] requirements-parser-0.9.0/tests/reqfiles/vcs_git_extras_require.txt000066400000000000000000000001111460322744000260250ustar00rootroot00000000000000git+https://git.myproject.org/MyProject.git@v0.1#egg=MyProject[security] requirements-parser-0.9.0/tests/reqfiles/vcs_hg.expected000066400000000000000000000117261460322744000235160ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+http://hg.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+https://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+https://hg.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+ssh://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+ssh://hg.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+http://hg.myproject.org/MyProject@da39a3ee5e6b#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "da39a3ee5e6b" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+http://hg.myproject.org/MyProject@2019#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "2019" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+http://hg.myproject.org/MyProject@v1.0#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "v1.0" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "-e hg+http://hg.myproject.org/MyProject@special_feature#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "special_feature" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "hg+http://hg.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "hg+https://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "hg+https://hg.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "hg+ssh://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "hg+ssh://hg.myproject.org/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "hg+http://hg.myproject.org/MyProject@da39a3ee5e6b#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "da39a3ee5e6b" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "hg+http://hg.myproject.org/MyProject@2019#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "2019" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "hg+http://hg.myproject.org/MyProject@v1.0#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "v1.0" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "hg+http://hg.myproject.org/MyProject", "extras": [], "vcs": "hg", "path": null, "line": "hg+http://hg.myproject.org/MyProject@special_feature#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "special_feature" } ] requirements-parser-0.9.0/tests/reqfiles/vcs_hg.txt000066400000000000000000000014561460322744000225330ustar00rootroot00000000000000-e hg+http://hg.myproject.org/MyProject#egg=MyProject -e hg+https://hg.myproject.org/MyProject#egg=MyProject -e hg+ssh://hg.myproject.org/MyProject#egg=MyProject -e hg+http://hg.myproject.org/MyProject@da39a3ee5e6b#egg=MyProject -e hg+http://hg.myproject.org/MyProject@2019#egg=MyProject -e hg+http://hg.myproject.org/MyProject@v1.0#egg=MyProject -e hg+http://hg.myproject.org/MyProject@special_feature#egg=MyProject hg+http://hg.myproject.org/MyProject#egg=MyProject hg+https://hg.myproject.org/MyProject#egg=MyProject hg+ssh://hg.myproject.org/MyProject#egg=MyProject hg+http://hg.myproject.org/MyProject@da39a3ee5e6b#egg=MyProject hg+http://hg.myproject.org/MyProject@2019#egg=MyProject hg+http://hg.myproject.org/MyProject@v1.0#egg=MyProject hg+http://hg.myproject.org/MyProject@special_feature#egg=MyProject requirements-parser-0.9.0/tests/reqfiles/vcs_svn.expected000066400000000000000000000027361460322744000237270ustar00rootroot00000000000000[ { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "svn+svn://svn.myproject.org/svn/MyProject", "extras": [], "vcs": "svn", "path": null, "line": "-e svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": true, "subdirectory": null, "uri": "svn+http://svn.myproject.org/svn/MyProject/trunk", "extras": [], "vcs": "svn", "path": null, "line": "-e svn+http://svn.myproject.org/svn/MyProject/trunk@2019#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "2019" }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "svn+svn://svn.myproject.org/svn/MyProject", "extras": [], "vcs": "svn", "path": null, "line": "svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": null }, { "specifier": false, "local_file": false, "name": "MyProject", "editable": false, "subdirectory": null, "uri": "svn+http://svn.myproject.org/svn/MyProject/trunk", "extras": [], "vcs": "svn", "path": null, "line": "svn+http://svn.myproject.org/svn/MyProject/trunk@2019#egg=MyProject", "hash_name": null, "hash": null, "specs": [], "revision": "2019" } ] requirements-parser-0.9.0/tests/reqfiles/vcs_svn.txt000066400000000000000000000003771460322744000227440ustar00rootroot00000000000000-e svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject -e svn+http://svn.myproject.org/svn/MyProject/trunk@2019#egg=MyProject svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject svn+http://svn.myproject.org/svn/MyProject/trunk@2019#egg=MyProject requirements-parser-0.9.0/tests/test_parser.py000066400000000000000000000052171460322744000216130ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 import json import warnings from os import listdir from os.path import dirname, isfile, join from types import GeneratorType from typing import List from unittest import TestCase from requirements import parse class TestParser(TestCase): _requirements_files_dir: str @classmethod def setUpClass(cls) -> None: cls._requirements_files_dir = join(dirname(__file__), 'reqfiles') def test_requirement_files(self) -> None: for fn in listdir(TestParser._requirements_files_dir): fp = join(TestParser._requirements_files_dir, fn) # skip ".expected" files if not isfile(fp) or not fp.endswith('.txt'): continue self._test_req_file(req_file=fn) def _test_req_file(self, req_file: str) -> None: fp = join(TestParser._requirements_files_dir, req_file) with open(fp) as req_fh: with warnings.catch_warnings(): warnings.simplefilter('ignore') parsed = parse(req_fh) if 'fail' in req_file: with self.assertRaises(ValueError): list([dict(r) for r in parsed]) else: with open(fp[:-4] + '.expected', 'r') as f2: self.assertIsInstance(parsed, GeneratorType) self.assertEqual(json.loads(f2.read()), listify(dict(r) for r in parsed), msg=f'Failed on {fp}') def listify(iterable: GeneratorType) -> List: out = [] for item in iterable: if isinstance(item, dict): for key, value in item.items(): if isinstance(item[key], (tuple, list)): if key in ('extras', 'specs'): # enforce predictability item[key] = sorted(listify(value)) # item[key] = listify(value) elif isinstance(item, (tuple, list)): item = listify(item) out.append(item) return out requirements-parser-0.9.0/tests/test_requirement.py000066400000000000000000000041411460322744000226520ustar00rootroot00000000000000# encoding: utf-8 # This file is part of requirements-parser library. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 from typing import Tuple from unittest import TestCase from requirements.requirement import Requirement class TestRequirement(TestCase): @staticmethod def get_reqs(requirement_1: str, requirement_2: str) -> Tuple[Requirement, Requirement]: return (Requirement.parse(requirement_1), Requirement.parse(requirement_2)) def test_simple_equality(self) -> None: self.assertEqual(*TestRequirement.get_reqs('pylib==1.0.0', 'pylib==1.0.0')) def test_equality_no_specifiers(self) -> None: self.assertEqual(*TestRequirement.get_reqs('pylib', 'pylib')) def test_simple_inequality(self) -> None: self.assertNotEqual(*TestRequirement.get_reqs('pylib==1.0.0', 'pylib==1.0.1')) def test_spec_order_equality(self) -> None: """ The same specifications, in a different order, are still equal """ self.assertEqual(*TestRequirement.get_reqs('pylib>=1.0,<2.0', 'pylib<2.0,>=1.0')) def test_vcs_equality(self) -> None: self.assertEqual(*TestRequirement.get_reqs( '-e git://git.example.com/MyProject.git@da39a3ee#egg=MyProject', '-e git://git.example.com/MyProject.git@da39a3ee#egg=MyProject' )) def test_vcs_hash_inequality(self) -> None: self.assertNotEqual(*TestRequirement.get_reqs( '-e git://git.example.com/MyProject.git@123#egg=MyProject', '-e git://git.example.com/MyProject.git@abc#egg=MyProject' )) requirements-parser-0.9.0/tox.ini000066400000000000000000000017711460322744000170600ustar00rootroot00000000000000# tox (https://tox.readthedocs.io/) is a tool for running tests # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. [tox] minversion = 4.0 envlist = flake8 mypy-{current,lowest} py{312,311,310,39,38} skip_missing_interpreters = True usedevelop = False download = False [testenv] # settings in this category apply to all other testenv, if not overwritten skip_install = True allowlist_externals = poetry commands_pre = {envpython} --version poetry install -v poetry run pip freeze commands = poetry run coverage run --source=requirements -m unittest discover -s tests -v [testenv:mypy{,-current,-lowest}] commands = # mypy config is in own file: `.mypy.ini` !lowest: poetry run mypy lowest: poetry run mypy --python-version=3.8 [testenv:flake8] commands = # mypy config is in own file: `.flake8` poetry run flake8 requirements/ tests/