Skip to content

Commit 89b9ac1

Browse files
authored
Convert setup.py to setup.cfg (#53)
1 parent 0840654 commit 89b9ac1

File tree

4 files changed

+45
-47
lines changed

4 files changed

+45
-47
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ repos:
77
- id: end-of-file-fixer
88
- id: requirements-txt-fixer
99
- id: trailing-whitespace
10+
- repo: https://github.com/asottile/setup-cfg-fmt
11+
rev: v1.20.1
12+
hooks:
13+
- id: setup-cfg-fmt
1014
- repo: https://github.com/asottile/pyupgrade
1115
rev: v2.31.1
1216
hooks:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bump_version:
22
@printf 'Enter new version: '; \
33
read new_version; \
4-
sed -i"" -r "s/version=\"[^\"]*\"/version=\"$${new_version}\"/" setup.py
4+
sed -i"" -r "s/version = .*/version = $${new_version}/" setup.cfg
55

66
dist:
77
rm -rf ansq.egg-info/ build/ dist/

setup.cfg

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
[metadata]
2+
name = ansq
3+
version = 0.0.18
4+
description = Written with native Asyncio NSQ package
5+
long_description = file: README.md
6+
long_description_content_type = text/markdown
7+
url = https://github.com/list-family/ansq
8+
author = LiST
9+
author_email = [email protected]
10+
license = MIT
11+
license_file = LICENSE
12+
classifiers =
13+
Development Status :: 3 - Alpha
14+
Environment :: Web Environment
15+
Intended Audience :: Developers
16+
License :: OSI Approved :: MIT License
17+
Programming Language :: Python
18+
Programming Language :: Python :: 3
19+
Programming Language :: Python :: 3 :: Only
20+
Programming Language :: Python :: 3.6
21+
Programming Language :: Python :: 3.7
22+
Programming Language :: Python :: 3.8
23+
Programming Language :: Python :: 3.9
24+
Programming Language :: Python :: 3.10
25+
Topic :: Software Development
26+
Topic :: Software Development :: Libraries
27+
28+
[options]
29+
packages = find:
30+
install_requires =
31+
aiohttp>=1.0.0
32+
attrs>=20.1
33+
python_requires = >=3.6
34+
include_package_data = True
35+
36+
[options.packages.find]
37+
exclude = tests
38+
139
[coverage:run]
240
branch = True
341
source = .

setup.py

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
import sys
1+
from setuptools import setup
22

3-
from setuptools import find_packages, setup
4-
5-
PY_VER = sys.version_info
6-
7-
# NOTE: keep this in sync with `additional_dependencies` in `.pre-commit-config.yaml`
8-
install_requires = [
9-
"aiohttp>=1.0.0",
10-
"attrs>=20.1",
11-
]
12-
13-
classifiers = [
14-
"License :: OSI Approved :: MIT License",
15-
"Development Status :: 3 - Alpha",
16-
"Programming Language :: Python",
17-
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.6",
19-
"Programming Language :: Python :: 3.7",
20-
"Programming Language :: Python :: 3.8",
21-
"Programming Language :: Python :: 3.9",
22-
"Programming Language :: Python :: 3.10",
23-
"Environment :: Web Environment",
24-
"Intended Audience :: Developers",
25-
"Topic :: Software Development",
26-
"Topic :: Software Development :: Libraries",
27-
]
28-
29-
with open("README.md") as f:
30-
long_description = f.read()
31-
32-
setup(
33-
name="ansq",
34-
version="0.0.18",
35-
description="Written with native Asyncio NSQ package",
36-
long_description=long_description,
37-
long_description_content_type="text/markdown",
38-
python_requires=">=3.6",
39-
classifiers=classifiers,
40-
author="LiST",
41-
author_email="[email protected]",
42-
url="https://github.com/list-family/ansq",
43-
license="MIT",
44-
packages=find_packages(exclude=["tests"]),
45-
install_requires=install_requires,
46-
include_package_data=True,
47-
)
3+
setup()

0 commit comments

Comments
 (0)