This repository was archived by the owner on Jan 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
chore: migrate from setup.py to pyproject.toml #144
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Instructions for Deploying | ||
| # Instructions for Building | ||
|
|
||
| ### Install dependencies | ||
|
|
||
|
|
@@ -7,34 +7,20 @@ Use a virtual environment and install dependencies | |
| ``` | ||
| > python3 -m venv venv | ||
| > source venv/bin/activate | ||
| > pip install twine build python-dotenv | ||
| > pip install build | ||
|
|
||
| python3 -m venv venv; source venv/bin/activate; pip install twine build python-dotenv | ||
| python3 -m venv venv; source venv/bin/activate; pip install build | ||
| ``` | ||
|
|
||
| ### Build the project | ||
|
|
||
| This will create the `/dist` directory | ||
| ``` | ||
| python setup.py sdist bdist_wheel | ||
| python -m build | ||
| ``` | ||
|
|
||
| ### Run tests | ||
|
|
||
| ``` | ||
| python setup.py pytest | ||
| ``` | ||
|
|
||
| ### Publish the package | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. people outside the org can't publish anyways, so removing this block |
||
|
|
||
| To publish the package, you need an API key on pypi.org. You can save this API key in a `.pypirc` file | ||
|
|
||
| ``` | ||
| [pypi] | ||
| username = __token__ | ||
| password = pypi__abc... | ||
| ``` | ||
|
|
||
| ``` | ||
| python3 -m twine upload dist/* | ||
| pytest | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,86 @@ | ||
| [build-system] | ||
| requires = [ | ||
| "setuptools>=42", | ||
| "wheel" | ||
| ] | ||
| requires = ["setuptools >= 75.0"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "passage-identity" | ||
| version = "3.0.1" | ||
| dependencies = [ | ||
| "cryptography ~= 44.0", # used by pyjwt | ||
| "pydantic ~= 2.10", # used by codgen | ||
| "pyjwt ~= 2.9", | ||
| "python-dateutil ~= 2.9", # used by codegen | ||
| "requests ~= 2.32", | ||
| ] | ||
| requires-python = ">=3.8" | ||
| authors = [ | ||
| { name = "Passage by 1Password", email = "support@passage.id" }, | ||
| ] | ||
| description = "Passkey Complete for Python - Integrate into your Python API or service to enable a completely passwordless standalone auth solution with Passage by 1Password" | ||
| readme = "README.md" | ||
| classifiers = [ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these were pulled from https://pypi.org/classifiers/ |
||
| "Development Status :: 5 - Production/Stable", | ||
| "Intended Audience :: Developers", | ||
| "License :: OSI Approved :: MIT License", | ||
| "Operating System :: OS Independent", | ||
| "Topic :: Security", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3 :: Only", | ||
| "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", | ||
| "Programming Language :: Python :: 3.13", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Documentation = "https://docs.passage.id/complete" | ||
| "Bug Tracker" = "https://github.com/passageidentity/.github/blob/main/SUPPORT.md" | ||
|
|
||
| [project.license] | ||
| file = "LICENSE" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [project]
license-files = ["LICENSE"]the above syntax is noted in the docs but hasn't been adopted by |
||
|
|
||
| [project.optional-dependencies] | ||
| test = [ | ||
| "pytest ~= 8.3", | ||
| ] | ||
| lint = [ | ||
| "ruff ~= 0.8", | ||
| ] | ||
| dev = [ | ||
| "passage-identity[test,lint]", | ||
| ] | ||
|
|
||
| [tool.ruff] | ||
| exclude = [ | ||
| ".eggs", | ||
| ".git", | ||
| ".pytest_cache", | ||
| ".ruff_cache", | ||
| ".venv", | ||
| ".vscode", | ||
| "__pypackages__", | ||
| "dist", | ||
| "passageidentity/openapi_client", | ||
| ] | ||
| line-length = 120 | ||
| indent-width = 4 | ||
| target-version = "py38" | ||
|
|
||
| [tool.ruff.lint] | ||
| select = ["ALL"] | ||
| ignore = [] | ||
| fixable = ["ALL"] | ||
| unfixable = [] | ||
| dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
|
||
| [tool.ruff.lint.per-file-ignores] | ||
| "tests/**.py" = ["D", "S101", "PLR2004"] | ||
|
|
||
| [tool.ruff.format] | ||
| quote-style = "double" | ||
| indent-style = "space" | ||
| skip-magic-trailing-comma = false | ||
| line-ending = "auto" | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't seem necessary to try to upgrade pip just to install
build