proper packaging

This commit is contained in:
boyska 2019-11-15 18:17:06 +01:00
parent 2fef5ee57e
commit 5b0129e569
4 changed files with 34 additions and 1 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
*.swp
*.pyc
*~
build/
dist/

2
server/__init__.py Normal file
View file

@ -0,0 +1,2 @@
import server
import cli

View file

@ -81,7 +81,7 @@ def common_pre():
for warn in check():
logger.warn(warn)
if __name__ == "__main__":
def main():
parser = ArgumentParser(description='creates mp3 from live recordings')
parser.add_argument('--verbose', '-v', action='count',
help='Increase verbosity; can be used multiple times')
@ -122,3 +122,5 @@ if __name__ == "__main__":
logging.info("giving verbose flag >2 times is useless")
common_pre()
options.func(options)
if __name__ == "__main__":
main()

27
setup.py Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env python
from setuptools import setup
requires = [
line.strip()
for line in open("server/requirements.txt").read().split("\n")
if line.strip()
]
setup(
name="techrec",
version="1.1",
description="A Python2 web application "
"that assist radio speakers in recording their shows",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="boyska",
author_email="piuttosto@logorroici.org",
packages=["techrec"],
package_dir={"techrec": "server"},
install_requires=requires,
entry_points={
"console_scripts": [
"techrec = techrec.cli:main",
]
},
)