Skip to content

Commit c173a14

Browse files
deronnaxMathieu Dupuy
authored and
Mathieu Dupuy
committed
migrate setup.py to setup.cfg
No man pages
1 parent 9e8e369 commit c173a14

File tree

2 files changed

+88
-119
lines changed

2 files changed

+88
-119
lines changed

setup.cfg

+86
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,95 @@ norecursedirs = tests/fixtures
1212
addopts = --tb=native --doctest-modules --verbose
1313
xfail_strict = True
1414

15+
[metadata]
16+
name = httpie
17+
version = attr: httpie.__version__
18+
author = Jakub Roztocil
19+
author_email = jakub@roztocil.co
20+
license = BSD
21+
description = HTTPie: modern, user-friendly command-line HTTP client for the API era.
22+
url = https://httpie.io/
23+
long_description = file: README.md
24+
long_description_content_type = text/markdown
25+
classifiers =
26+
Development Status :: 5 - Production/Stable
27+
Programming Language :: Python
28+
Programming Language :: Python :: 3 :: Only
29+
Environment :: Console
30+
Intended Audience :: Developers
31+
Intended Audience :: System Administrators
32+
License :: OSI Approved :: BSD License
33+
Topic :: Internet :: WWW/HTTP
34+
Topic :: Software Development
35+
Topic :: System :: Networking
36+
Topic :: Terminals
37+
Topic :: Text Processing
38+
Topic :: Utilities
39+
project_urls =
40+
GitHub = https://github.com/httpie/cli
41+
Twitter = https://twitter.com/httpie
42+
Discord = https://httpie.io/discord
43+
Documentation = https://httpie.io/docs
44+
Online Demo = https://httpie.io/run
45+
46+
47+
[options]
48+
packages = find:
49+
install_requires =
50+
pip
51+
charset_normalizer>=2.0.0
52+
defusedxml>=0.6.0
53+
requests[socks]>=2.22.0
54+
Pygments>=2.5.2
55+
requests-toolbelt>=0.9.1
56+
multidict>=4.7.0
57+
setuptools
58+
importlib-metadata>=1.4.0; python_version < "3.8"
59+
rich>=9.10.0
60+
python_requires = >=3.7
61+
1562

1663
[flake8]
1764
# <https://flake8.pycqa.org/en/latest/user/error-codes.html>
1865
# E501 - line too long
1966
# W503 - line break before binary operator
2067
ignore = E501,W503
68+
69+
[options.packages.find]
70+
include = httpie; httpie.*
71+
72+
[options.entry_points]
73+
console_scripts =
74+
http = httpie.__main__:main
75+
https = httpie.__main__:main
76+
httpie = httpie.manager.__main__:main
77+
78+
[options.extras_require]
79+
dev =
80+
pytest
81+
pytest-httpbin>=0.0.6
82+
pytest-lazy-fixture>=0.0.6
83+
responses
84+
pytest-mock
85+
werkzeug<2.1.0
86+
flake8
87+
flake8-comprehensions
88+
flake8-deprecated
89+
flake8-mutable
90+
flake8-tuple
91+
pyopenssl
92+
pytest-cov
93+
pyyaml
94+
twine
95+
wheel
96+
Jinja2
97+
test =
98+
pytest
99+
pytest-httpbin>=0.0.6
100+
pytest-lazy-fixture>=0.0.6
101+
responses
102+
pytest-mock
103+
werkzeug<2.1.0
104+
105+
[options.data_files]
106+
data =

setup.py

+2-119
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,5 @@
11
# This is purely the result of trial and error.
22

3-
import sys
3+
from setuptools import setup
44

5-
from setuptools import setup, find_packages
6-
7-
import httpie
8-
9-
10-
# Note: keep requirements here to ease distributions packaging
11-
tests_require = [
12-
'pytest',
13-
'pytest-httpbin>=0.0.6',
14-
'pytest-lazy-fixture>=0.0.6',
15-
'responses',
16-
'pytest-mock',
17-
'werkzeug<2.1.0'
18-
]
19-
dev_require = [
20-
*tests_require,
21-
'flake8',
22-
'flake8-comprehensions',
23-
'flake8-deprecated',
24-
'flake8-mutable',
25-
'flake8-tuple',
26-
'pyopenssl',
27-
'pytest-cov',
28-
'pyyaml',
29-
'twine',
30-
'wheel',
31-
'Jinja2'
32-
]
33-
install_requires = [
34-
'pip',
35-
'charset_normalizer>=2.0.0',
36-
'defusedxml>=0.6.0',
37-
'requests[socks]>=2.22.0',
38-
'Pygments>=2.5.2',
39-
'requests-toolbelt>=0.9.1',
40-
'multidict>=4.7.0',
41-
'setuptools',
42-
'importlib-metadata>=1.4.0; python_version < "3.8"',
43-
'rich>=9.10.0'
44-
]
45-
install_requires_win_only = [
46-
'colorama>=0.2.4',
47-
]
48-
49-
# Conditional dependencies:
50-
51-
# sdist
52-
if 'bdist_wheel' not in sys.argv:
53-
54-
if 'win32' in str(sys.platform).lower():
55-
# Terminal colors for Windows
56-
install_requires.extend(install_requires_win_only)
57-
58-
59-
# bdist_wheel
60-
extras_require = {
61-
'dev': dev_require,
62-
'test': tests_require,
63-
# https://wheel.readthedocs.io/en/latest/#defining-conditional-dependencies
64-
':sys_platform == "win32"': install_requires_win_only,
65-
}
66-
67-
68-
def long_description():
69-
with open('README.md', encoding='utf-8') as f:
70-
return f.read()
71-
72-
73-
setup(
74-
name='httpie',
75-
version=httpie.__version__,
76-
description=httpie.__doc__.strip(),
77-
long_description=long_description(),
78-
long_description_content_type='text/markdown',
79-
url='https://httpie.io/',
80-
download_url=f'https://github.com/httpie/cli/archive/{httpie.__version__}.tar.gz',
81-
author=httpie.__author__,
82-
author_email='jakub@roztocil.co',
83-
license=httpie.__licence__,
84-
packages=find_packages(include=['httpie', 'httpie.*']),
85-
entry_points={
86-
'console_scripts': [
87-
'http = httpie.__main__:main',
88-
'https = httpie.__main__:main',
89-
'httpie = httpie.manager.__main__:main',
90-
],
91-
},
92-
python_requires='>=3.7',
93-
extras_require=extras_require,
94-
install_requires=install_requires,
95-
classifiers=[
96-
'Development Status :: 5 - Production/Stable',
97-
'Programming Language :: Python',
98-
'Programming Language :: Python :: 3 :: Only',
99-
'Environment :: Console',
100-
'Intended Audience :: Developers',
101-
'Intended Audience :: System Administrators',
102-
'License :: OSI Approved :: BSD License',
103-
'Topic :: Internet :: WWW/HTTP',
104-
'Topic :: Software Development',
105-
'Topic :: System :: Networking',
106-
'Topic :: Terminals',
107-
'Topic :: Text Processing',
108-
'Topic :: Utilities'
109-
],
110-
project_urls={
111-
'GitHub': 'https://github.com/httpie/cli',
112-
'Twitter': 'https://twitter.com/httpie',
113-
'Discord': 'https://httpie.io/discord',
114-
'Documentation': 'https://httpie.io/docs',
115-
'Online Demo': 'https://httpie.io/run',
116-
},
117-
data_files=[
118-
('share/man/man1', ['extras/man/http.1']),
119-
('share/man/man1', ['extras/man/https.1']),
120-
('share/man/man1', ['extras/man/httpie.1']),
121-
]
122-
)
5+
setup()

0 commit comments

Comments
 (0)