-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
104 lines (85 loc) · 3.08 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import os
import sys
from shutil import rmtree
from setuptools import setup, find_packages, Command
from fordev import __version__
from fordev import __author__
here = os.path.abspath(os.path.dirname(__file__))
class PublishCommand(Command):
"""Support setup.py publish."""
description = 'Build and publish package in Pypi.'
user_options = []
@staticmethod
def print_status(msg):
"""Prints message in bold and yellow."""
print(f'\033[1;33m{msg}\033[0m')
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
self.print_status('Removing previous builds…')
rmtree(os.path.join(here, 'dist'))
rmtree(os.path.join(here, 'build'))
except OSError:
pass
self.print_status('Build Source and Wheel distribution…')
os.system(f'{sys.executable} setup.py sdist bdist_wheel')
self.print_status('Uploading the package to PyPi via Twine…')
os.system('twine upload --config-file .pypirc --repository pypi dist/*')
sys.exit()
with open(os.path.join(here, 'README.md'), mode='r', encoding='utf-8') as f:
long_description = '\n' + f.read()
setup(
name='fordev',
version=__version__,
description='Gere e valide dados randômicos com fordev',
long_description=long_description,
long_description_content_type='text/markdown',
license='MIT License',
author=__author__,
author_email='[email protected]',
url='https://github.com/matheusfelipeog/fordev',
packages=find_packages(
exclude=('tests',)
),
install_requires=[
'requests',
'beautifulsoup4',
'colorama'
],
zip_safe=False,
python_requires='>=3.7',
project_urls={
"Bug Tracker": "https://github.com/matheusfelipeog/fordev/issues",
"Documentation": "https://fordev.readthedocs.io/",
"Source Code": "https://github.com/matheusfelipeog/fordev",
},
keywords=[
'fordev', '4dev', '4devs', '4devs-api', '4devs-module',
'fourthdev', 'python', 'api', 'scraping', 'data-generator',
'fake-data', 'fake-data-generator', 'data-manipulation',
'data-validation', 'random-data'
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'Natural Language :: Portuguese (Brazilian)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'
],
# setup.py publish support
cmdclass={
'publish': PublishCommand
}
)