diff --git a/.gitignore b/.gitignore index 262d827..2e35fa0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.swp *.pyc *~ +build/ +dist/ diff --git a/server/__init__.py b/server/__init__.py new file mode 100644 index 0000000..4d4ce6f --- /dev/null +++ b/server/__init__.py @@ -0,0 +1,2 @@ +import server +import cli diff --git a/server/cli.py b/server/cli.py index 13e6545..e2badb9 100644 --- a/server/cli.py +++ b/server/cli.py @@ -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() diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..150a536 --- /dev/null +++ b/setup.py @@ -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", + ] + }, +)