2018-07-23 17:10:13 +00:00
|
|
|
[build-system]
|
2024-02-25 19:49:27 +00:00
|
|
|
# These requirements must be kept sync with the requirements in
|
2024-08-26 22:55:00 +00:00
|
|
|
# ./.github/requirements/build-requirements.{in,txt}
|
2018-07-23 17:10:13 +00:00
|
|
|
requires = [
|
2024-07-05 18:57:08 +00:00
|
|
|
"maturin>=1,<2",
|
|
|
|
|
|
2023-03-24 20:59:44 +00:00
|
|
|
# Must be kept in sync with `project.dependencies`
|
2021-10-19 11:45:04 +00:00
|
|
|
"cffi>=1.12; platform_python_implementation != 'PyPy'",
|
2025-01-08 12:09:29 +00:00
|
|
|
# Used by cffi (which import distutils, and in Python 3.12, distutils has
|
|
|
|
|
# been removed from the stdlib, but installing setuptools puts it back) as
|
|
|
|
|
# well as our build.rs for the rust/cffi bridge.
|
2024-09-07 02:39:35 +00:00
|
|
|
"setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2",
|
2018-07-23 17:10:13 +00:00
|
|
|
]
|
2024-07-05 18:57:08 +00:00
|
|
|
build-backend = "maturin"
|
2020-07-20 18:06:29 +00:00
|
|
|
|
2023-03-24 20:59:44 +00:00
|
|
|
[project]
|
|
|
|
|
name = "cryptography"
|
2024-11-27 18:16:39 +00:00
|
|
|
version = "45.0.0.dev1"
|
2023-03-24 20:59:44 +00:00
|
|
|
authors = [
|
2025-01-08 12:09:29 +00:00
|
|
|
{ name = "The Python Cryptographic Authority and individual contributors", email = "cryptography-dev@python.org" },
|
2023-03-24 20:59:44 +00:00
|
|
|
]
|
|
|
|
|
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
2023-03-31 06:13:40 +00:00
|
|
|
readme = "README.rst"
|
2025-01-08 12:09:29 +00:00
|
|
|
license = { text = "Apache-2.0 OR BSD-3-Clause" }
|
2023-03-24 20:59:44 +00:00
|
|
|
classifiers = [
|
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
|
"License :: OSI Approved :: Apache Software License",
|
|
|
|
|
"License :: OSI Approved :: BSD License",
|
|
|
|
|
"Natural Language :: English",
|
|
|
|
|
"Operating System :: MacOS :: MacOS X",
|
|
|
|
|
"Operating System :: POSIX",
|
|
|
|
|
"Operating System :: POSIX :: BSD",
|
|
|
|
|
"Operating System :: POSIX :: Linux",
|
|
|
|
|
'Operating System :: Microsoft :: Windows',
|
|
|
|
|
"Programming Language :: Python",
|
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
|
|
|
"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",
|
2023-08-26 20:53:09 +00:00
|
|
|
"Programming Language :: Python :: 3.12",
|
2024-08-26 22:55:34 +00:00
|
|
|
"Programming Language :: Python :: 3.13",
|
2023-03-24 20:59:44 +00:00
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
|
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
|
|
|
"Topic :: Security :: Cryptography",
|
|
|
|
|
]
|
2024-11-26 16:23:15 +00:00
|
|
|
requires-python = ">=3.7,!=3.9.0,!=3.9.1"
|
2023-03-24 20:59:44 +00:00
|
|
|
dependencies = [
|
|
|
|
|
# Must be kept in sync with `build-system.requires`
|
2024-01-01 19:17:08 +00:00
|
|
|
"cffi>=1.12; platform_python_implementation != 'PyPy'",
|
2023-03-24 20:59:44 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[project.urls]
|
|
|
|
|
homepage = "https://github.com/pyca/cryptography"
|
|
|
|
|
documentation = "https://cryptography.io/"
|
|
|
|
|
source = "https://github.com/pyca/cryptography/"
|
|
|
|
|
issues = "https://github.com/pyca/cryptography/issues"
|
|
|
|
|
changelog = "https://cryptography.io/en/latest/changelog/"
|
|
|
|
|
|
|
|
|
|
[project.optional-dependencies]
|
|
|
|
|
ssh = ["bcrypt >=3.1.5"]
|
|
|
|
|
|
|
|
|
|
# All the following are used for our own testing.
|
2024-11-17 14:34:00 +00:00
|
|
|
nox = ["nox >=2024.04.15", "nox[uv] >=2024.03.02; python_version >= '3.8'"]
|
2023-03-24 20:59:44 +00:00
|
|
|
test = [
|
2024-11-27 18:16:39 +00:00
|
|
|
"cryptography_vectors",
|
2024-11-17 14:34:00 +00:00
|
|
|
"pytest >=7.4.0",
|
|
|
|
|
"pytest-benchmark >=4.0",
|
|
|
|
|
"pytest-cov >=2.10.1",
|
|
|
|
|
"pytest-xdist >=3.5.0",
|
|
|
|
|
"pretend >=0.7",
|
|
|
|
|
"certifi >=2024",
|
2023-03-24 20:59:44 +00:00
|
|
|
]
|
|
|
|
|
test-randomorder = ["pytest-randomly"]
|
2025-01-08 12:09:29 +00:00
|
|
|
docs = [
|
|
|
|
|
"sphinx >=5.3.0",
|
|
|
|
|
"sphinx-rtd-theme >=3.0.0; python_version >= '3.8'",
|
|
|
|
|
"sphinx-inline-tabs; python_version >= '3.8'",
|
|
|
|
|
]
|
|
|
|
|
docstest = [
|
|
|
|
|
"pyenchant >=3",
|
|
|
|
|
"readme-renderer >=30.0",
|
|
|
|
|
"sphinxcontrib-spelling >=7.3.1",
|
|
|
|
|
]
|
2024-11-11 14:31:49 +00:00
|
|
|
sdist = ["build >=1.0.0"]
|
2023-10-25 22:15:44 +00:00
|
|
|
# `click` included because its needed to type check `release.py`
|
2025-01-08 12:09:29 +00:00
|
|
|
pep8test = [
|
|
|
|
|
"ruff >=0.3.6",
|
|
|
|
|
"mypy >=1.4",
|
|
|
|
|
"check-sdist; python_version >= '3.8'",
|
|
|
|
|
"click >=8.0.1",
|
|
|
|
|
]
|
2023-03-24 20:59:44 +00:00
|
|
|
|
2024-07-05 18:57:08 +00:00
|
|
|
[tool.maturin]
|
|
|
|
|
python-source = "src"
|
|
|
|
|
python-packages = ["cryptography"]
|
|
|
|
|
manifest-path = "src/rust/Cargo.toml"
|
|
|
|
|
module-name = "cryptography.hazmat.bindings._rust"
|
|
|
|
|
locked = true
|
|
|
|
|
sdist-generator = "git"
|
|
|
|
|
features = ["pyo3/abi3-py37"]
|
|
|
|
|
include = [
|
|
|
|
|
"CHANGELOG.rst",
|
|
|
|
|
"CONTRIBUTING.rst",
|
|
|
|
|
"LICENSE",
|
|
|
|
|
"LICENSE.APACHE",
|
|
|
|
|
"LICENSE.BSD",
|
|
|
|
|
|
|
|
|
|
"docs/**/*",
|
2023-08-23 14:32:16 +00:00
|
|
|
|
2024-07-05 18:57:08 +00:00
|
|
|
"src/_cffi_src/**/*.py",
|
|
|
|
|
"src/_cffi_src/**/*.c",
|
|
|
|
|
"src/_cffi_src/**/*.h",
|
|
|
|
|
|
2024-12-03 00:03:33 +00:00
|
|
|
"Cargo.toml",
|
|
|
|
|
"Cargo.lock",
|
|
|
|
|
"src/rust/**/Cargo.toml",
|
|
|
|
|
"src/rust/**/Cargo.lock",
|
2024-07-05 18:57:08 +00:00
|
|
|
"src/rust/**/*.rs",
|
|
|
|
|
|
|
|
|
|
"tests/**/*.py",
|
|
|
|
|
]
|
|
|
|
|
exclude = [
|
|
|
|
|
"vectors/**/*",
|
2024-12-03 00:03:33 +00:00
|
|
|
"target/**/*",
|
2024-07-05 18:57:08 +00:00
|
|
|
"docs/_build/**/*",
|
|
|
|
|
".github/**/*",
|
|
|
|
|
".readthedocs.yml",
|
|
|
|
|
"ci-constraints-requirements.txt",
|
|
|
|
|
"mypy.ini",
|
|
|
|
|
]
|
2023-08-23 14:32:16 +00:00
|
|
|
|
2020-12-15 14:42:34 +00:00
|
|
|
[tool.pytest.ini_options]
|
2023-03-29 02:28:17 +00:00
|
|
|
addopts = "-r s --capture=no --strict-markers --benchmark-disable"
|
2023-03-09 11:02:46 +00:00
|
|
|
console_output_style = "progress-even-when-capture-no"
|
2020-12-15 14:42:34 +00:00
|
|
|
markers = [
|
|
|
|
|
"skip_fips: this test is not executed in FIPS mode",
|
|
|
|
|
"supported: parametrized test requiring only_if and skip_message",
|
|
|
|
|
]
|
2021-06-19 17:39:00 +00:00
|
|
|
|
|
|
|
|
[tool.mypy]
|
|
|
|
|
show_error_codes = true
|
|
|
|
|
check_untyped_defs = true
|
2021-08-29 19:18:18 +00:00
|
|
|
no_implicit_reexport = true
|
2021-12-23 12:55:23 +00:00
|
|
|
warn_redundant_casts = true
|
|
|
|
|
warn_unused_ignores = true
|
2022-12-04 23:38:51 +00:00
|
|
|
warn_unused_configs = true
|
|
|
|
|
strict_equality = true
|
2021-06-19 17:39:00 +00:00
|
|
|
|
|
|
|
|
[[tool.mypy.overrides]]
|
2025-01-08 12:09:29 +00:00
|
|
|
module = ["pretend"]
|
2021-06-19 17:39:00 +00:00
|
|
|
ignore_missing_imports = true
|
2022-05-26 22:35:05 +00:00
|
|
|
|
|
|
|
|
[tool.coverage.run]
|
|
|
|
|
branch = true
|
|
|
|
|
relative_files = true
|
2025-01-08 12:09:29 +00:00
|
|
|
source = ["cryptography", "tests/"]
|
2022-05-26 22:35:05 +00:00
|
|
|
|
|
|
|
|
[tool.coverage.paths]
|
|
|
|
|
source = [
|
2024-08-04 18:50:38 +00:00
|
|
|
"src/cryptography",
|
|
|
|
|
"*.nox/*/lib*/python*/site-packages/cryptography",
|
|
|
|
|
"*.nox\\*\\Lib\\site-packages\\cryptography",
|
|
|
|
|
"*.nox/pypy/site-packages/cryptography",
|
2022-05-26 22:35:05 +00:00
|
|
|
]
|
2025-01-08 12:09:29 +00:00
|
|
|
tests = ["tests/", "*tests\\"]
|
2022-05-26 22:35:05 +00:00
|
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
|
exclude_lines = [
|
|
|
|
|
"@abc.abstractmethod",
|
|
|
|
|
"@typing.overload",
|
|
|
|
|
"if typing.TYPE_CHECKING",
|
|
|
|
|
]
|
2022-12-21 02:44:47 +00:00
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
|
line-length = 79
|
|
|
|
|
|
2024-02-02 13:51:50 +00:00
|
|
|
lint.ignore = ['N818']
|
|
|
|
|
lint.select = ['E', 'F', 'I', 'N', 'W', 'UP', 'RUF']
|
|
|
|
|
|
|
|
|
|
[tool.ruff.lint.isort]
|
2022-12-21 02:44:47 +00:00
|
|
|
known-first-party = ["cryptography", "cryptography_vectors", "tests"]
|
2023-04-30 16:14:28 +00:00
|
|
|
|
|
|
|
|
[tool.check-sdist]
|
|
|
|
|
git-only = [
|
|
|
|
|
"vectors/*",
|
|
|
|
|
"release.py",
|
|
|
|
|
"ci-constraints-requirements.txt",
|
|
|
|
|
".gitattributes",
|
|
|
|
|
".gitignore",
|
2023-12-23 15:42:56 +00:00
|
|
|
]
|