Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setup.py minimal and maximal versions for setting up python packages to `pip install -e .`
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Search and Replace @@@@@
# Minimal Requirements have ### after
# ^ Just one import line and setup function run
from setuptools import setup, find_packages ###
import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
def read(*names, **kwargs):
return io.open(
join(dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
).read()
setup(
name='MyPackageName@@@@@',
version='1.0.0@@@@@',
license='MIT@@@@@'
url='https://github.com/mypackage.git@@@@@',
author='Author Name@@@@@',
author_email='author@gmail.com@@@@@',
description='Description of my package@@@@@',
# long_description='%s' % (
# re.compile('^.. start-badges.*^.. end-badges', re.M | re.S).sub('', read('README.rst'))
# ),
# py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
# include_package_data=True,
# zip_safe=False,
packages=find_packages(), # or find_packages('src'), and package_dir={'': 'src'},
install_requires=['numpy >= 1.11.1', 'matplotlib >= 1.5.1'],
# classifiers=[
# # complete classifier list:
# # http://pypi.python.org/pypi?%3Aaction=list_classifiers
# 'Development Status :: Development Status :: 1 - Planning',
# 'Intended Audience :: Developers',
# 'License :: OSI Approved :: MIT License',
# 'Operating System :: Unix',
# 'Operating System :: POSIX',
# 'Operating System :: Microsoft :: Windows',
# 'Programming Language :: Python',
# 'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 3',
# 'Programming Language :: Python :: 3.6',
# 'Programming Language :: Python :: 3.7',
# 'Programming Language :: Python :: Implementation :: CPython',
# 'Topic :: Software Development :: Libraries :: Python Modules',
# 'Topic :: Utilities',
# ],
# keywords=[
# '@@@@@@@@@@@@', '@@@@@@@@@@@@'
# ],
# ],
# extras_require={
# # eg:
# # 'rst': ['docutils>=0.11'],
# # ':python_version=="2.6"': ['argparse'],
# },
# entry_points={
# 'console_scripts': [
# '@@@@@@@@@@@@ = @@@@@@@@@@@@.cli:main', # package name
# ]
# },
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment