Skip to content

Instantly share code, notes, and snippets.

@davidbgk
Forked from anonymous/setup.py
Created January 14, 2017 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidbgk/efbab6ea2d2791c85006439d62788936 to your computer and use it in GitHub Desktop.
Save davidbgk/efbab6ea2d2791c85006439d62788936 to your computer and use it in GitHub Desktop.
setup.py template
#!/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