Migrated setup.py to setuptools
Also: now we extract all the metadata from __main__.py
This commit is contained in:
parent
820efd211c
commit
d7972285c2
43
setup.py
43
setup.py
|
|
@ -1,34 +1,24 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
import io
|
from setuptools import setup, find_packages
|
||||||
import os
|
# Package meta-data, mostly from the package
|
||||||
from distutils.core import setup
|
from kibot.__main__ import __author__, __email__, __url__, __doc__, __version__
|
||||||
|
|
||||||
# Package meta-data.
|
# Use the README.md as a long description.
|
||||||
NAME = 'kibot'
|
# Note this is also included in the MANIFEST.in
|
||||||
DESCRIPTION = 'KiCad automation tool for documents generation'
|
with open('README.md', encoding='utf-8') as f:
|
||||||
URL = 'https://github.com/INTI-CMNB/KiBot/'
|
|
||||||
EMAIL = 'set@ieee.org'
|
|
||||||
AUTHOR = 'Salvador E. Tropea'
|
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
# Import the README and use it as the long-description.
|
|
||||||
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
|
|
||||||
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
||||||
long_description = '\n' + f.read()
|
long_description = '\n' + f.read()
|
||||||
about = {}
|
|
||||||
with open(os.path.join(here, NAME, '__version__.py')) as f:
|
|
||||||
exec(f.read(), about)
|
|
||||||
|
|
||||||
setup(name=NAME,
|
setup(name='kibot',
|
||||||
version=about['__version__'],
|
version=__version__,
|
||||||
description=DESCRIPTION,
|
# docopt style: the text after ": " from the first line of the docstring
|
||||||
|
description=__doc__.split('\n')[0].split(': ')[1],
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
# long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
author=AUTHOR,
|
author=__author__,
|
||||||
author_email=EMAIL,
|
author_email=__email__,
|
||||||
url=URL,
|
url=__url__,
|
||||||
packages=[NAME, NAME+'/kicad', NAME+'/bom'],
|
# Packages are marked using __init__.py
|
||||||
package_dir={NAME: NAME},
|
packages=find_packages(),
|
||||||
scripts=['src/kibot', 'src/kiplot'],
|
scripts=['src/kibot', 'src/kiplot'],
|
||||||
install_requires=['pyyaml', 'mcpy', 'xlsxwriter'],
|
install_requires=['pyyaml', 'mcpy', 'xlsxwriter'],
|
||||||
classifiers=['Development Status :: 5 - Production/Stable',
|
classifiers=['Development Status :: 5 - Production/Stable',
|
||||||
|
|
@ -42,4 +32,5 @@ setup(name=NAME,
|
||||||
],
|
],
|
||||||
platforms='POSIX',
|
platforms='POSIX',
|
||||||
license='GPL-3.0',
|
license='GPL-3.0',
|
||||||
|
python_requires='>=3.2',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue