Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 52968d8

Browse files
Improving setup confs to Pypi deploy
1 parent 44b986e commit 52968d8

File tree

2 files changed

+43
-14
lines changed

2 files changed

+43
-14
lines changed

‎setup.cfg‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#make wheel build a universal wheel file
2+
[bdist_wheel]
3+
universal = 1
4+
5+
#ensures that your LICENSE file is part of the wheel files which is a common license requirement
6+
[metadata]
7+
license_file = LICENSE

‎setup.py‎

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,54 @@
1-
from setuptools import setup
2-
from setuptools import find_packages
1+
import codecs
2+
from setuptools import setup, find_packages
3+
from os import path
4+
import os
5+
from pip._internal.req import parse_requirements
36

4-
with open("README.md", 'r') as fi: # pragma: no cover
5-
long_desc = fi.read()
7+
here = path.abspath(path.dirname(__file__))
68

7-
with open("VERSION.txt", 'r') as ver: # pragma: no cover
8-
version = ver.read()
9+
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
10+
README = readme.read()
11+
12+
# allowes setup.py to be run from any path
13+
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
14+
15+
# parse_requirements() returns generator of pip.req.InstallRequirement objects
16+
INSTALL_REQS = parse_requirements('requirements.txt', session='hack')
17+
18+
# reqs is a list of requirements
19+
REQUIREMENTS = [str(ir.req) for ir in INSTALL_REQS]
20+
21+
CLASSIFIERS = [
22+
"Development Status :: 5 - Production/Stable",
23+
"Intended Audience :: Developers",
24+
"Natural Language :: Portuguese",
25+
"License :: OSI Approved :: GNU License",
26+
"Operating System :: OS Independent",
27+
"Programming Language :: Python",
28+
"Programming Language :: Python :: 3.6",
29+
"Programming Language :: Python :: Implementation :: CPython",
30+
"Programming Language :: Python :: Implementation :: PyPy",
31+
"Topic :: Software Development :: Libraries :: Python Modules",
32+
]
933

1034
setup( # pragma: no cover
1135
name='commit-helper',
1236
description="A python program that helps you write commits following commit conventions", # nopep8
1337
url='https://github.com/andre-filho/commit-helper',
14-
long_description=long_desc,
38+
long_description=codecs.open('README.md', 'rb', 'utf8').read(),
1539
long_description_content_type='text/markdown',
1640
author='Andre de Sousa Costa Filho',
1741
author_email='andre.filho001@outlook.com',
18-
version=str(version).replace('\n', ''),
42+
version=codecs.open('VERSION.txt', 'rb', 'utf8').read(),
1943
packages=find_packages(),
44+
keywords=['commit', 'helper', 'git', 'version', 'versioning'],
2045
entry_points={
2146
'console_scripts': [
2247
'commit = commit_helper.__main__:main',
2348
'commit-helper = commit_helper.__main__:main',
2449
]
2550
},
26-
install_requires=[
27-
'pathlib',
28-
'pyyaml',
29-
'argparse',
30-
'colored',
31-
],
51+
install_requires=REQUIREMENTS,
52+
license='GNU',
53+
classifiers=CLASSIFIERS,
3254
)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /