|
1 | 1 | # This is purely the result of trial and error.
|
2 | 2 |
|
3 |
| -import sys |
| 3 | +from setuptools import setup |
4 | 4 |
|
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