Skip to content

Commit 8b4e13d

Browse files
authored
Move project metadata and config to pyproject.toml (#583)
* Build with 'build' * Declare build backend and requirements * Move project metadata and config to pyproject.toml
1 parent f288da1 commit 8b4e13d

File tree

5 files changed

+63
-76
lines changed

5 files changed

+63
-76
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine
19+
pip install build twine
2020
- name: Build and publish
2121
env:
2222
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ release-test: sdist
2020
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
2121

2222
sdist: clean
23-
python setup.py sdist bdist_wheel
23+
python -m build -d dist .
2424
ls -l dist
2525

2626
test:

pyproject.toml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[build-system]
2+
requires = ["setuptools >= 77.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "python-dotenv"
7+
description = "Read key-value pairs from a .env file and set them as environment variables"
8+
authors = [
9+
{name = "Saurabh Kumar", email = "me+github@saurabh-kumar.com"},
10+
]
11+
license = "BSD-3-Clause"
12+
keywords = [
13+
"environment variables",
14+
"deployments",
15+
"settings",
16+
"env",
17+
"dotenv",
18+
"configurations",
19+
"python",
20+
]
21+
classifiers = [
22+
"Development Status :: 5 - Production/Stable",
23+
"Programming Language :: Python",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
30+
"Programming Language :: Python :: Implementation :: PyPy",
31+
"Intended Audience :: Developers",
32+
"Intended Audience :: System Administrators",
33+
"Operating System :: OS Independent",
34+
"Topic :: System :: Systems Administration",
35+
"Topic :: Utilities",
36+
"Environment :: Web Environment",
37+
]
38+
39+
requires-python = ">=3.9"
40+
41+
dynamic = ["version", "readme"]
42+
43+
[project.urls]
44+
Source = "https://github.com/theskumar/python-dotenv"
45+
46+
[project.optional-dependencies]
47+
cli = [
48+
"click>=5.0",
49+
]
50+
51+
[project.scripts]
52+
dotenv = "dotenv.__main__:cli"
53+
54+
[tool.setuptools]
55+
packages = ["dotenv"]
56+
package-dir = {"" = "src"}
57+
package-data = {dotenv = ["py.typed"]}
58+
59+
[tool.setuptools.dynamic]
60+
version = {attr = "dotenv.version.__version__"}
61+
readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"}

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ exclude = .tox,.git,docs,venv,.venv,build
1313
check_untyped_defs = true
1414
ignore_missing_imports = true
1515

16-
[metadata]
17-
description_file = README.md
18-
1916
[tool:pytest]
2017
testpaths = tests
2118

setup.py

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)