Skip to content

Commit 6cf9e15

Browse files
committed
update setuptools configuration
1 parent a9c1287 commit 6cf9e15

File tree

2 files changed

+82
-96
lines changed

2 files changed

+82
-96
lines changed

setup.cfg

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,84 @@
1+
[metadata]
2+
name = sample
3+
description = "A sample Python project"
4+
long_description = file: README.rst
5+
# Versions should comply with PEP440. For a discussion on single-sourcing
6+
# the version across setup.py and the project code, see
7+
# https://packaging.python.org/en/latest/single_source_version.html
8+
version = 1.2.0
9+
# Author details
10+
author = The Python Packaging Authority
11+
author_email = [email protected]
12+
# The project's main homepage.
13+
url = https://github.com/pypa/sampleproject
14+
# Choose your license
15+
license = MIT
16+
# What does your project relate to?
17+
keywords = sample, setuptools, development
18+
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
19+
# How mature is this project? Common values are
20+
# 3 - Alpha
21+
# 4 - Beta
22+
# 5 - Production/Stable
23+
# Indicate who your project is intended for
24+
# Pick your license as you wish (should match "license" above)
25+
# Specify the Python versions you support here. In particular, ensure
26+
# that you indicate whether you support Python 2, Python 3 or both.
27+
classifiers =
28+
Development Status :: 3 - Alpha
29+
Intended Audience :: Developers
30+
Topic :: Software Development :: Build Tools
31+
License :: OSI Approved :: MIT License
32+
Programming Language :: Python :: 2
33+
Programming Language :: Python :: 2.7
34+
Programming Language :: Python :: 3
35+
Programming Language :: Python :: 3.3
36+
Programming Language :: Python :: 3.4
37+
Programming Language :: Python :: 3.5
38+
Programming Language :: Python :: 3.6
39+
40+
[options]
41+
# You can just specify the packages manually here if your project is
42+
# simple. Or you can use find.
43+
packages = find:
44+
# Alternatively, if you want to distribute just a my_module.py, uncomment
45+
# this:
46+
# py_modules=["my_module"],
47+
48+
# List run-time dependencies here. These will be installed by pip when
49+
# your project is installed. For an analysis of "install_requires" vs pip's
50+
# requirements files see:
51+
# https://packaging.python.org/en/latest/requirements.html
52+
install_requires =
53+
peppercorn
54+
55+
[options.extras_require]
56+
# List additional groups of dependencies here (e.g. development
57+
# dependencies). You can install these using the following syntax,
58+
# for example:
59+
# $ pip install -e .[dev,test]
60+
dev =
61+
check-manifest
62+
test =
63+
coverage
64+
65+
[options.entry_points]
66+
# To provide executable scripts, use entry points in preference to the
67+
# "scripts" keyword. Entry points provide cross-platform support and allow
68+
# pip to create the appropriate form of executable for the target platform.
69+
console_scripts =
70+
sample = sample:main
71+
72+
[options.package_data]
73+
sample = package_data.dat
74+
75+
[options.packages.find]
76+
# Exclude specific packages
77+
exclude =
78+
contrib
79+
docs
80+
tests
81+
182
[bdist_wheel]
283
# This flag says that the code is written to work on both Python 2 and Python
384
# 3. If at all possible, it is good practice to do this. If you cannot, you

setup.py

Lines changed: 1 addition & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -6,108 +6,13 @@
66
"""
77

88
# Always prefer setuptools over distutils
9-
from setuptools import setup, find_packages
10-
# To use a consistent encoding
11-
from codecs import open
12-
from os import path
9+
from setuptools import setup
1310

14-
here = path.abspath(path.dirname(__file__))
15-
16-
# Get the long description from the README file
17-
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
18-
long_description = f.read()
1911

2012
setup(
21-
name='sample',
22-
23-
# Versions should comply with PEP440. For a discussion on single-sourcing
24-
# the version across setup.py and the project code, see
25-
# https://packaging.python.org/en/latest/single_source_version.html
26-
version='1.2.0',
27-
28-
description='A sample Python project',
29-
long_description=long_description,
30-
31-
# The project's main homepage.
32-
url='https://github.com/pypa/sampleproject',
33-
34-
# Author details
35-
author='The Python Packaging Authority',
36-
author_email='[email protected]',
37-
38-
# Choose your license
39-
license='MIT',
40-
41-
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
42-
classifiers=[
43-
# How mature is this project? Common values are
44-
# 3 - Alpha
45-
# 4 - Beta
46-
# 5 - Production/Stable
47-
'Development Status :: 3 - Alpha',
48-
49-
# Indicate who your project is intended for
50-
'Intended Audience :: Developers',
51-
'Topic :: Software Development :: Build Tools',
52-
53-
# Pick your license as you wish (should match "license" above)
54-
'License :: OSI Approved :: MIT License',
55-
56-
# Specify the Python versions you support here. In particular, ensure
57-
# that you indicate whether you support Python 2, Python 3 or both.
58-
'Programming Language :: Python :: 2',
59-
'Programming Language :: Python :: 2.7',
60-
'Programming Language :: Python :: 3',
61-
'Programming Language :: Python :: 3.3',
62-
'Programming Language :: Python :: 3.4',
63-
'Programming Language :: Python :: 3.5',
64-
],
65-
66-
# What does your project relate to?
67-
keywords='sample setuptools development',
68-
69-
# You can just specify the packages manually here if your project is
70-
# simple. Or you can use find_packages().
71-
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
72-
73-
# Alternatively, if you want to distribute just a my_module.py, uncomment
74-
# this:
75-
# py_modules=["my_module"],
76-
77-
# List run-time dependencies here. These will be installed by pip when
78-
# your project is installed. For an analysis of "install_requires" vs pip's
79-
# requirements files see:
80-
# https://packaging.python.org/en/latest/requirements.html
81-
install_requires=['peppercorn'],
82-
83-
# List additional groups of dependencies here (e.g. development
84-
# dependencies). You can install these using the following syntax,
85-
# for example:
86-
# $ pip install -e .[dev,test]
87-
extras_require={
88-
'dev': ['check-manifest'],
89-
'test': ['coverage'],
90-
},
91-
92-
# If there are data files included in your packages that need to be
93-
# installed, specify them here. If using Python 2.6 or less, then these
94-
# have to be included in MANIFEST.in as well.
95-
package_data={
96-
'sample': ['package_data.dat'],
97-
},
98-
9913
# Although 'package_data' is the preferred approach, in some case you may
10014
# need to place data files outside of your packages. See:
10115
# http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
10216
# In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
10317
data_files=[('my_data', ['data/data_file'])],
104-
105-
# To provide executable scripts, use entry points in preference to the
106-
# "scripts" keyword. Entry points provide cross-platform support and allow
107-
# pip to create the appropriate form of executable for the target platform.
108-
entry_points={
109-
'console_scripts': [
110-
'sample=sample:main',
111-
],
112-
},
11318
)

0 commit comments

Comments
 (0)