-
Notifications
You must be signed in to change notification settings - Fork 4
chore: migrate from setup.py to pyproject.toml #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
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 | ||
``` |
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 = [ | ||
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" | ||
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.
This file was deleted.
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