add setup.py

This commit is contained in:
relikd
2022-04-08 14:09:36 +02:00
parent 68167e9d1d
commit 8784edd18f
4 changed files with 93 additions and 0 deletions

25
.gitignore vendored Normal file
View File

@@ -0,0 +1,25 @@
.DS_Store
/env-publish/
__pycache__/
*.py[cod]
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

16
Makefile Normal file
View File

@@ -0,0 +1,16 @@
dist: setup.py botlib/*
@echo Building...
python3 setup.py sdist bdist_wheel
rm -rf ./*.egg-info/ ./build/ MANIFEST
env-publish:
@echo Creating virtual environment...
@python3 -m venv 'env-publish'
@source env-publish/bin/activate && pip install twine
.PHONY: publish
publish: dist env-publish
[ -z "$${VIRTUAL_ENV}" ] # you can not do this inside a virtual environment.
@echo Publishing...
@echo "\033[0;31mEnter PyPI token in password prompt:\033[0m"
@source env-publish/bin/activate && export TWINE_USERNAME='__token__' && twine upload dist/*

View File

@@ -1,3 +1,8 @@
'''
Collection of tools to streamline data format conversion.
'''
__version__ = '1.0.0'
# import sys
# if __name__ != '__main__':
# sys.path.insert(0, __path__[0])

47
setup.py Normal file
View File

@@ -0,0 +1,47 @@
from setuptools import setup
from botlib import __doc__, __version__
with open('README.md') as fp:
longdesc = fp.read()
setup(
name='botlib',
version=__version__,
description=__doc__.strip(),
long_description=longdesc,
long_description_content_type="text/markdown",
author='relikd',
url='https://github.com/relikd/botlib',
license='MIT',
packages=['botlib'],
entry_points={
'console_scripts': [
'html2list = botlib.html2list:_cli',
]
},
python_requires='>=3.5',
keywords=[
'conversion',
'converter',
'data-processing',
'html',
'xml',
'rss',
'telegram',
],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Text Processing :: General',
'Topic :: Text Processing :: Markup',
'Topic :: Utilities',
],
)