Created
January 11, 2017 17:38
-
-
Save anonymous/3cafbf289e9348e7d90338834ff043b4 to your computer and use it in GitHub Desktop.
setup.py template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
""" | |
python distribute file | |
""" | |
from __future__ import (absolute_import, division, print_function, | |
unicode_literals, with_statement) | |
from setuptools import setup, find_packages | |
def requirements_file_to_list(fn="requirements.txt"): | |
"""read a requirements file and create a list that can be used in setup. | |
""" | |
with open(fn, 'r') as f: | |
return [x.rstrip() for x in list(f) if x and not x.startswith('#')] | |
setup( | |
name="mypkg", | |
version="0.1.0", | |
packages=find_packages(), | |
install_requires=requirements_file_to_list(), | |
dependency_links=[ | |
# If your project has dependencies on some internal packages that is | |
# not on PyPI, you may list package index url here. Then you can just | |
# mention package name and version in requirements.txt file. | |
], | |
entry_points={ | |
# 'console_scripts': [ | |
# 'main = mypkg.main:main', | |
# ] | |
}, | |
package_data={ | |
'mypkg': [b'logger.conf'] | |
}, | |
author="FIXME add author", | |
author_email="FIXME add email", | |
maintainer="FIXME add maintainer", | |
maintainer_email="FIXME add email", | |
description="FIXME add description", | |
long_description=open('README.rst').read(), | |
license="GPLv2+", | |
url="https://pypi.python.org/pypi/mypkg", | |
classifiers=[ | |
'Development Status :: 3 - Alpha', | |
'License :: OSI Approved :: GNU General Public License (GPL)', | |
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', | |
'Programming Language :: Python :: 2.7', | |
'Programming Language :: Python :: 3.4', | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment