Skip to content

Instantly share code, notes, and snippets.

@MatthewRalston
Last active June 22, 2019 05:41
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 MatthewRalston/0049d7fe72629f2e874ea0e23086c6e3 to your computer and use it in GitHub Desktop.
Save MatthewRalston/0049d7fe72629f2e874ea0e23086c6e3 to your computer and use it in GitHub Desktop.
Example setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import sys
from shutil import rmtree
from setuptools import find_packages, setup, Command
# Package meta-data.
NAME = 'mypackage'
DESCRIPTION = 'My short description for my project.'
URL = 'https://github.com/me/myproject'
EMAIL = ''
AUTHOR = 'Some body'
REQUIRES_PYTHON = '>=3.6.0'
VERSION = '0.1.0'
# What packages are required for this module to be executed?
REQUIRED = [l.rstrip() for l in open('./requirements.txt', 'r')]
# What packages are optional?
EXTRAS = {
'development': [l.rstrip() for l in open('./requirements-dev.txt', 'r')]
# 'fancy feature': ['django'],
}
# Where the magic happens:
setup(
name=NAME,
version=about['__version__'],
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
#packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
# If your package is a single module, use this instead of 'packages':
py_modules=['mypackage'],
scripts=['bin/myscript'],
# entry_points={
# 'console_scripts': ['mycli=mymodule:cli'],
# },
install_requires=REQUIRED,
extras_require=EXTRAS,
include_package_data=True,
license='GPLv3+',
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'
],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment