pyproject-external 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. pyproject_external-0.1.0/.gitattributes +2 -0
  2. pyproject_external-0.1.0/.github/workflows/pypi.yml +63 -0
  3. pyproject_external-0.1.0/.github/workflows/test.yml +48 -0
  4. pyproject_external-0.1.0/.gitignore +213 -0
  5. pyproject_external-0.1.0/.pre-commit-config.yaml +50 -0
  6. pyproject_external-0.1.0/CODE_OF_CONDUCT +132 -0
  7. pyproject_external-0.1.0/CONTRIBUTING +22 -0
  8. pyproject_external-0.1.0/LICENSE +20 -0
  9. pyproject_external-0.1.0/PKG-INFO +223 -0
  10. pyproject_external-0.1.0/README.md +168 -0
  11. pyproject_external-0.1.0/pixi.lock +3503 -0
  12. pyproject_external-0.1.0/pyproject.toml +144 -0
  13. pyproject_external-0.1.0/src/pyproject_external/__init__.py +35 -0
  14. pyproject_external-0.1.0/src/pyproject_external/__main__.py +9 -0
  15. pyproject_external-0.1.0/src/pyproject_external/_cli/__init__.py +4 -0
  16. pyproject_external-0.1.0/src/pyproject_external/_cli/_utils.py +39 -0
  17. pyproject_external-0.1.0/src/pyproject_external/_cli/app.py +36 -0
  18. pyproject_external-0.1.0/src/pyproject_external/_cli/build.py +120 -0
  19. pyproject_external-0.1.0/src/pyproject_external/_cli/install.py +97 -0
  20. pyproject_external-0.1.0/src/pyproject_external/_cli/prepare.py +66 -0
  21. pyproject_external-0.1.0/src/pyproject_external/_cli/show.py +105 -0
  22. pyproject_external-0.1.0/src/pyproject_external/_config.py +36 -0
  23. pyproject_external-0.1.0/src/pyproject_external/_constants.py +30 -0
  24. pyproject_external-0.1.0/src/pyproject_external/_external.py +368 -0
  25. pyproject_external-0.1.0/src/pyproject_external/_registry.py +370 -0
  26. pyproject_external-0.1.0/src/pyproject_external/_sdist.py +86 -0
  27. pyproject_external-0.1.0/src/pyproject_external/_system.py +183 -0
  28. pyproject_external-0.1.0/src/pyproject_external/_url.py +85 -0
  29. pyproject_external-0.1.0/src/pyproject_external/_version.py +21 -0
  30. pyproject_external-0.1.0/src/pyproject_external/py.typed +2 -0
  31. pyproject_external-0.1.0/tests/test_commands.py +185 -0
  32. pyproject_external-0.1.0/tests/test_external.py +158 -0
  33. pyproject_external-0.1.0/tests/test_registry.py +67 -0
  34. pyproject_external-0.1.0/tests/test_system.py +47 -0
  35. pyproject_external-0.1.0/tests/test_url.py +21 -0
@@ -0,0 +1,2 @@
1
+ # SCM syntax highlighting
2
+ pixi.lock linguist-language=YAML linguist-generated=true
@@ -0,0 +1,63 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ release:
9
+ types:
10
+ - published
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
17
+ with:
18
+ fetch-tags: true
19
+ fetch-depth: 0
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
23
+ with:
24
+ python-version: "3.x"
25
+
26
+ - name: Install build tools
27
+ run: python -m pip install --upgrade pip wheel build twine
28
+
29
+ - name: Build wheels
30
+ run: python -m build --sdist --wheel . --outdir dist
31
+
32
+ - name: Check wheels
33
+ working-directory: dist
34
+ run: |
35
+ ls -alh
36
+ python -m pip install *.whl
37
+ python -m twine check *
38
+
39
+ - name: Upload release distributions
40
+ uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
41
+ with:
42
+ name: release-dists
43
+ path: dist/
44
+
45
+ publish:
46
+ runs-on: ubuntu-latest
47
+ if: github.event_name == 'release'
48
+ needs: [build]
49
+ permissions:
50
+ id-token: write
51
+ environment:
52
+ name: pypi
53
+ url: https://pypi.org/p/pyproject-external
54
+
55
+ steps:
56
+ - name: Retrieve release distributions
57
+ uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
58
+ with:
59
+ name: release-dists
60
+ path: dist/
61
+
62
+ - name: Publish release distributions to PyPI
63
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.14
@@ -0,0 +1,48 @@
1
+ name: Test
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ tags:
7
+ - "*"
8
+ pull_request:
9
+ paths:
10
+ - ".github/workflows/test.yml"
11
+ - "src/**"
12
+ - "tests/**"
13
+ - "pyproject.toml"
14
+
15
+ concurrency:
16
+ # Concurrency group that uses the workflow name and PR number if available
17
+ # or commit SHA as a fallback. If a new build is triggered under that
18
+ # concurrency group while a previous build is running it will be canceled.
19
+ # Repeated pushes to a PR will cancel all previous builds, while multiple
20
+ # merges to main will not cancel.
21
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
22
+ cancel-in-progress: true
23
+
24
+ jobs:
25
+ tests:
26
+ name: ${{ matrix.os }}, py${{ matrix.python-version }}
27
+ runs-on: ${{ matrix.os }}
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ os: [ubuntu-latest, windows-latest]
32
+ python-version: ["310", "311", "312", "313"]
33
+ include:
34
+ - os: macos-13
35
+ python-version: "310"
36
+ - os: macos-14
37
+ python-version: "313"
38
+ env:
39
+ PIXI_ENV_NAME: test-py${{ matrix.python-version }}
40
+ steps:
41
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42
+ with:
43
+ fetch-depth: 0
44
+ - uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
45
+ with:
46
+ environments: ${{ env.PIXI_ENV_NAME }}
47
+ - name: Run tests
48
+ run: pixi run --environment ${{ env.PIXI_ENV_NAME }} test
@@ -0,0 +1,213 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
208
+
209
+ # Streamlit
210
+ .streamlit/secrets.toml
211
+
212
+ # hatchling-vcs
213
+ src/pyproject_external/_version.py
@@ -0,0 +1,50 @@
1
+ # disable autofixing PRs, commenting "pre-commit.ci autofix" on a pull request triggers a autofix
2
+ ci:
3
+ autofix_prs: false
4
+ # generally speaking we ignore all vendored code as well as tests data
5
+ # TODO: Restore index and solver exclude lines before merge
6
+ exclude: |
7
+ (?x)^(
8
+ tests/data/.* |
9
+ pixi.lock
10
+ )$
11
+ repos:
12
+ # generic verification and formatting
13
+ - repo: https://github.com/pre-commit/pre-commit-hooks
14
+ rev: v5.0.0
15
+ hooks:
16
+ # standard end of line/end of file cleanup
17
+ - id: mixed-line-ending
18
+ - id: end-of-file-fixer
19
+ - id: trailing-whitespace
20
+ # ensure syntaxes are valid
21
+ - id: check-toml
22
+ - id: check-yaml
23
+ # catch git merge/rebase problems
24
+ - id: check-merge-conflict
25
+ - repo: https://github.com/adamchainz/blacken-docs
26
+ rev: 1.19.1
27
+ hooks:
28
+ # auto format Python codes within docstrings
29
+ - id: blacken-docs
30
+ - repo: https://github.com/astral-sh/ruff-pre-commit
31
+ rev: v0.12.2
32
+ hooks:
33
+ # lint & attempt to correct failures (e.g. pyupgrade)
34
+ - id: ruff
35
+ args: [--fix]
36
+ # compatible replacement for black
37
+ - id: ruff-format
38
+ - repo: meta
39
+ # see https://pre-commit.com/#meta-hooks
40
+ hooks:
41
+ - id: check-hooks-apply
42
+ - id: check-useless-excludes
43
+ - repo: local
44
+ hooks:
45
+ - id: git-diff
46
+ name: git diff
47
+ entry: git diff --exit-code
48
+ language: system
49
+ pass_filenames: false
50
+ always_run: true
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,22 @@
1
+ # Contributing guidelines
2
+
3
+ The main purpose of the code and content in this repository is to experiment
4
+ with the design of PEP 725 and potential follow-up work around a name mapping
5
+ mechanism for PyPI/Python. The code is therefore "research quality" rather than
6
+ production-quality. When considering a contribution to this repository, please
7
+ consider the following guidelines:
8
+
9
+ - Questions, comments, bug reports regarding the methodology or implementation
10
+ of it and new feature suggestions are very welcome - please feel free to open
11
+ a new issue.
12
+ - Before opening a pull request with nontrivial changes to the current code,
13
+ please open an issue to discuss first.
14
+ - Please refrain from pull requests that deal with stylistic and non-critical
15
+ code quality issues.
16
+
17
+ ## Local development workflow
18
+
19
+ We use [`pixi`](https://github.com/prefix-dev/pixi) with the following tasks:
20
+
21
+ - `pixi run python -m pyproject_external` to run the CLI locally.
22
+ - `pixi run test` to run the tests. Choose your desired Python version by picking the adequate environment.
@@ -0,0 +1,20 @@
1
+ Copyright © 2023 Quansight Labs
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a
4
+ copy of this software and associated documentation files (the "Software"),
5
+ to deal in the Software without restriction, including without limitation
6
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
+ and/or sell copies of the Software, and to permit persons to whom the
8
+ Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice (including the next
11
+ paragraph) shall be included in all copies or substantial portions of the
12
+ Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20
+ DEALINGS IN THE SOFTWARE.