Last active
March 28, 2018 13:24
-
-
Save checkaayush/9bd3abdcbaac5c0aa299478556c30e66 to your computer and use it in GitHub Desktop.
Sample setup.py
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
# Reference: https://github.com/pypa/sampleproject/blob/master/setup.py | |
from setuptools import setup, find_packages | |
def requirements(): | |
"""Returns packages required by current project.""" | |
reqs = [] | |
with open('requirements.txt', 'r') as f: | |
for line in f: | |
if line.startswith('git+https'): | |
continue | |
reqs.append(line.strip()) | |
return reqs | |
def packages(): | |
"""Returns list of packages inside current project.""" | |
return find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) | |
setup( | |
name='my_project', | |
version='0.1', | |
description='My project description', | |
url='http://github.com/checkaayush/my-project', | |
author='Aayush Sarva', | |
author_email='[email protected]', | |
packages=packages(), | |
install_requires=requirements() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment