Skip to content

Commit c35846a

Browse files
committed
Merge main and fix up comments
2 parents db5806e + 8945e5e commit c35846a

File tree

5 files changed

+152
-178
lines changed

5 files changed

+152
-178
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ recommendations for version control, documentation, or testing.
1212

1313
[The source for this project is available here][src].
1414

15-
Most of the configuration for a Python project is done in the `setup.py` file,
15+
The metadata for a Python project is defined in the `pyproject.toml` file,
1616
an example of which is included in this project. You should edit this file
1717
accordingly to adapt this sample project to your needs.
1818

pyproject.toml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,152 @@
1+
[project]
2+
# This is the name of your project. The first time you publish this
3+
# package, this name will be registered for you. It will determine how
4+
# users can install this project, e.g.:
5+
#
6+
# $ pip install sampleproject
7+
#
8+
# And where it will live on PyPI: https://pypi.org/project/sampleproject/
9+
#
10+
# There are some restrictions on what makes a valid project name
11+
# specification here:
12+
# https://packaging.python.org/specifications/core-metadata/#name
13+
name = "sampleproject" # Required
14+
15+
# Versions should comply with PEP 440:
16+
# https://www.python.org/dev/peps/pep-0440/
17+
#
18+
# For a discussion on single-sourcing the version, see
19+
# https://packaging.python.org/guides/single-sourcing-package-version/
20+
version = "3.0.0" # Required
21+
22+
# This is a one-line description or tagline of what your project does. This
23+
# corresponds to the "Summary" metadata field:
24+
# https://packaging.python.org/specifications/core-metadata/#summary
25+
description = "A sample Python project" # Optional
26+
27+
# This is an optional longer description of your project that represents
28+
# the body of text which users will see when they visit PyPI.
29+
#
30+
# Often, this is the same as your README, so you can just read it in from
31+
# that file directly (as we have already done above)
32+
#
33+
# This field corresponds to the "Description" metadata field:
34+
# https://packaging.python.org/specifications/core-metadata/#description-optional
35+
readme = "README.md" # Optional
36+
37+
# Specify which Python versions you support. In contrast to the
38+
# 'Programming Language' classifiers above, 'pip install' will check this
39+
# and refuse to install the project if the version does not match. See
40+
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
41+
requires-python = ">=3.7"
42+
43+
# This is either text indicating the license for the distribution, or a file
44+
# that contains the license
45+
# https://packaging.python.org/en/latest/specifications/core-metadata/#license
46+
license = {file = "LICENSE.txt"}
47+
48+
# This field adds keywords for your project which will appear on the
49+
# project page. What does your project relate to?
50+
#
51+
# Note that this is a list of additional keywords, separated
52+
# by commas, to be used to assist searching for the distribution in a
53+
# larger catalog.
54+
keywords = ["sample", "setuptools", "development"] # Optional
55+
56+
# This should be your name or the name of the organization who originally
57+
# authored the project, and a valid email address corresponding to the name
58+
# listed.
59+
authors = [
60+
{name = "A. Random Developer", email = "author@example.com" } # Optional
61+
]
62+
63+
# This should be your name or the names of the organization who currently
64+
# maintains the project, and a valid email address corresponding to the name
65+
# listed.
66+
maintainers = [
67+
{name = "A. Great Maintainer", email = "maintainer@example.com" } # Optional
68+
]
69+
70+
# Classifiers help users find your project by categorizing it.
71+
#
72+
# For a list of valid classifiers, see https://pypi.org/classifiers/
73+
classifiers = [ # Optional
74+
# How mature is this project? Common values are
75+
# 3 - Alpha
76+
# 4 - Beta
77+
# 5 - Production/Stable
78+
"Development Status :: 3 - Alpha",
79+
80+
# Indicate who your project is intended for
81+
"Intended Audience :: Developers",
82+
"Topic :: Software Development :: Build Tools",
83+
84+
# Pick your license as you wish
85+
"License :: OSI Approved :: MIT License",
86+
87+
# Specify the Python versions you support here. In particular, ensure
88+
# that you indicate you support Python 3. These classifiers are *not*
89+
# checked by "pip install". See instead "python_requires" below.
90+
"Programming Language :: Python :: 3",
91+
"Programming Language :: Python :: 3.7",
92+
"Programming Language :: Python :: 3.8",
93+
"Programming Language :: Python :: 3.9",
94+
"Programming Language :: Python :: 3.10",
95+
"Programming Language :: Python :: 3.11",
96+
"Programming Language :: Python :: 3 :: Only",
97+
]
98+
99+
# This field lists other packages that your project depends on to run.
100+
# Any package you put here will be installed by pip when your project is
101+
# installed, so they must be valid existing projects.
102+
#
103+
# For an analysis of this field vs pip's requirements files see:
104+
# https://packaging.python.org/discussions/install-requires-vs-requirements/
105+
dependencies = [ # Optional
106+
"peppercorn"
107+
]
108+
109+
# List additional groups of dependencies here (e.g. development
110+
# dependencies). Users will be able to install these using the "extras"
111+
# syntax, for example:
112+
#
113+
# $ pip install sampleproject[dev]
114+
#
115+
# Similar to `dependencies` above, these must be valid existing
116+
# projects.
117+
[project.optional-dependencies] # Optional
118+
dev = ["check-manifest"]
119+
test = ["coverage"]
120+
121+
# List URLs that are relevant to your project
122+
#
123+
# This field corresponds to the "Project-URL" and "Home-Page" metadata fields:
124+
# https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
125+
# https://packaging.python.org/specifications/core-metadata/#home-page-optional
126+
#
127+
# Examples listed include a pattern for specifying where the package tracks
128+
# issues, where the source is hosted, where to say thanks to the package
129+
# maintainers, and where to support the project financially. The key is
130+
# what's used to render the link text on PyPI.
131+
[project.urls] # Optional
132+
"Homepage" = "https://github.com/pypa/sampleproject"
133+
"Bug Reports" = "https://github.com/pypa/sampleproject/issues"
134+
"Funding" = "https://donate.pypi.org"
135+
"Say Thanks!" = "http://saythanks.io/to/example"
136+
"Source" = "https://github.com/pypa/sampleproject/"
137+
138+
# The following would provide a command line executable called `sample`
139+
# which executes the function `main` from this package when invoked.
140+
[project.scripts] # Optional
141+
sample = "sample:main"
142+
143+
# This is configuration specific to the `setuptools` build backend.
144+
# If you are using a different build backend, you will need to change this.
145+
[tool.setuptools]
146+
# If there are data files included in your packages that need to be
147+
# installed, specify them here.
148+
package-data = {"sample" = ["*.dat"]}
149+
1150
[build-system]
2151
# These are the assumed default build requirements from pip:
3152
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support

setup.cfg

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

setup.py

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

tests/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# the inclusion of the tests module is not meant to offer best practices for
2-
# testing in general, but rather to support the `find_packages` example in
3-
# setup.py that excludes installing the "tests" package
1+
# The inclusion of the tests module is not meant to offer best practices for
2+
# testing in general.

0 commit comments

Comments
 (0)