Skip to content

Commit

Permalink
Use setuptools to install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaverga committed Oct 24, 2018
1 parent 4031c5a commit 18fad3c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ install:
script:
- if [[ $TRAVIS_PYTHON_VERSION == 3.6* ]]; then
flake8 .;
pytest -v --cov=pyongc test/;
pytest -v --cov=pyongc tests/;
else
pytest -v;
fi
Expand Down
4 changes: 2 additions & 2 deletions pyongc/ongc.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,8 @@ def _str_to_coords(text):
"HH:MM:SS.ss +/-DD:MM:SS.s"
:returns: array([[HH., MM., SS.ss],[DD., MM., SS.ss]])
"""
pattern = re.compile('^(?:(\d{1,2}):(\d{1,2}):(\d{1,2}(?:\.\d{1,2})?))\s'
'(?:([+-]\d{1,2}):(\d{1,2}):(\d{1,2}(?:\.\d{1,2})?))$')
pattern = re.compile(r'^(?:(\d{1,2}):(\d{1,2}):(\d{1,2}(?:\.\d{1,2})?))\s'
r'(?:([+-]\d{1,2}):(\d{1,2}):(\d{1,2}(?:\.\d{1,2})?))$')
result = pattern.match(text)

if result:
Expand Down
1 change: 1 addition & 0 deletions pyongc/scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
13 changes: 9 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

TESTS_REQUIRE = ['pytest', 'nose', 'coveralls']
TESTS_REQUIRE = ['pytest', 'mock', 'nose', 'coveralls']

CLASSIFIERS = [
'Development Status :: 3 - Alpha',
Expand All @@ -24,14 +24,19 @@
author='Mattia Verga',
author_email='mattia.verga@tiscali.it',
url='https://github.com/mattiaverga/PyOngc',
packages=find_packages(),
packages=find_packages(exclude=("tests",)),
package_data={'pyongc': ['ongc.db', ], },
scripts=['bin/ongc', ],
license='MIT',
description='Python interface to OpenNGC database data.',
long_description=LONG_DESCRIPTION,
classifiers=CLASSIFIERS,
install_requires=[],
install_requires=[
'Click',
],
entry_points='''
[console_scripts]
ongc=pyongc.scripts.ongc:cli
''',
tests_require=TESTS_REQUIRE,
extras_require={'tests': TESTS_REQUIRE},
python_requires=">=3",
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 18fad3c

Please sign in to comment.