From 4b11cdffc98e88206f473c72f711fd1f0b2931d4 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 29 Oct 2014 20:38:59 +0000 Subject: [PATCH] A few steps to try to make this pip-installable This is required for Issue #3 . --- .travis.yml | 6 +++--- didyoumean.py => didyoumean/didyoumean.py | 0 .../didyoumean_decorator.py | 0 .../didyoumean_hook.py | 0 .../didyoumean_tests.py | 0 setup.cfg | 2 ++ setup.py | 14 ++++++++++++++ 7 files changed, 19 insertions(+), 3 deletions(-) rename didyoumean.py => didyoumean/didyoumean.py (100%) rename didyoumean_decorator.py => didyoumean/didyoumean_decorator.py (100%) rename didyoumean_hook.py => didyoumean/didyoumean_hook.py (100%) rename didyoumean_tests.py => didyoumean/didyoumean_tests.py (100%) create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.travis.yml b/.travis.yml index ae67ee7..78719f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,9 @@ install: - pip install --upgrade pyflakes before_script: - - pep8 *.py --ignore=E501 + - pep8 *.py */*.py --ignore=E501 # to have the list anyway - - pep8 *.py --select=E501 || true + - pep8 *.py */*.py --select=E501 || true script: - - python3 -m unittest discover --pattern=*.py + - python3 -m unittest discover --start-directory=didyoumean --pattern=*.py diff --git a/didyoumean.py b/didyoumean/didyoumean.py similarity index 100% rename from didyoumean.py rename to didyoumean/didyoumean.py diff --git a/didyoumean_decorator.py b/didyoumean/didyoumean_decorator.py similarity index 100% rename from didyoumean_decorator.py rename to didyoumean/didyoumean_decorator.py diff --git a/didyoumean_hook.py b/didyoumean/didyoumean_hook.py similarity index 100% rename from didyoumean_hook.py rename to didyoumean/didyoumean_hook.py diff --git a/didyoumean_tests.py b/didyoumean/didyoumean_tests.py similarity index 100% rename from didyoumean_tests.py rename to didyoumean/didyoumean_tests.py diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..b88034e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..aeef1ef --- /dev/null +++ b/setup.py @@ -0,0 +1,14 @@ +from distutils.core import setup +# with the help from http://peterdowns.com/posts/first-time-with-pypi.html +setup( + name='didyoumean', + packages=['didyoumean'], # this must be the same as the name above + version='0.1', + description='Logic to have suggestions in case of errors (NameError, AttributeError, etc).', + author='Sylvain Desodt', + author_email='sylvain.desodt+didyoumean@gmail.com', + url='https://github.com/SylvainDe/DidYouMean-Python', # use the URL to the github repo + download_url='https://github.com/peterldowns/mypackage/tarball/0.1', # I'll explain this in a second + keywords=['didyoumean', 'exception', 'error', 'suggestion', 'excepthook', 'typo'], # arbitrary keywords + classifiers=[], +)