From cf53a6a6dd7d528c5cade1fe460eb2a5cacf1353 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Mon, 22 May 2017 16:17:01 +0200 Subject: [PATCH] Make "pip install -e ." work, although some dependencies are still missing --- .gitignore | 1 + setup.py | 36 ++++++++++++++++++------------------ src/barbequeue/__init__.py | 1 + 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 097a2bf9581..7706f7b77bd 100644 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,7 @@ celerybeat-schedule # virtualenv venv/ ENV/ +.venv # Spyder project settings .spyderproject diff --git a/setup.py b/setup.py index 57273c4b0ca..f706ad80263 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,20 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from __future__ import absolute_import, print_function, unicode_literals +from __future__ import absolute_import, print_function import logging +import os import sys -from setuptools import setup +from setuptools import find_packages, setup + + +sys.path.append( + os.path.join(os.path.dirname(__file__), 'src') +) + +# noqa +from barbequeue import __version__ # isort:skip # noqa def read_file(fname): @@ -47,28 +56,18 @@ def enable_log_to_stdout(logname): setup( name=dist_name, - version="0.0.1", + version=__version__, description=description, - long_description="{readme}".format( - readme=readme, ), + long_description="{readme}".format(readme=readme), author='Learning Equality', author_email='aron+barbequeue@learningequality.org', url='https://github.com/learningequality/barbequeue', - packages=[ - str('barbequeue'), - str('barbequeue.scheduler'), - str('barbequeue.common'), - str('barbequeue.storage.backends'), - str('barbequeue.messaging'), - str('barbequeue.messaging.backends'), - str('barbequeue.worker'), - str('barbequeue.worker.backends'), - ], - package_dir={'barbequeue': 'src/barbequeue'}, + packages=find_packages('src'), + package_dir={'': 'src'}, include_package_data=True, license='MIT', zip_safe=False, - keywords='queue', + keywords=('queue', 'async'), classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', @@ -82,4 +81,5 @@ def enable_log_to_stdout(logname): 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: PyPy', - ], ) + ], +) diff --git a/src/barbequeue/__init__.py b/src/barbequeue/__init__.py index e69de29bb2d..f102a9cadfa 100644 --- a/src/barbequeue/__init__.py +++ b/src/barbequeue/__init__.py @@ -0,0 +1 @@ +__version__ = "0.0.1"