-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python 3 compatibilty
- Loading branch information
Showing
4 changed files
with
35 additions
and
91 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
from .tdb import * | ||
|
||
__version__ = '3.5.1' | ||
|
||
|
||
def test(*args, **kwargs): | ||
import os | ||
import pytest | ||
pkg_path = os.path.dirname(__file__) | ||
os.chdir(pkg_path) | ||
pytest.main(list(args), **kwargs) | ||
''' | ||
Run py.test unit tests. | ||
''' | ||
import testr | ||
return testr.test(*args, **kwargs) |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,22 @@ | ||
import sys | ||
from setuptools import setup | ||
from setuptools.command.test import test as TestCommand | ||
|
||
from Ska.tdb.version import version | ||
from Ska.tdb import __version__ | ||
|
||
|
||
class PyTest(TestCommand): | ||
user_options = [('args=', 'a', "Arguments to pass to py.test")] | ||
|
||
def initialize_options(self): | ||
TestCommand.initialize_options(self) | ||
self.args = [] | ||
|
||
def run_tests(self): | ||
import pytest | ||
errno = pytest.main(self.args) | ||
sys.exit(errno) | ||
try: | ||
from testr.setup_helper import cmdclass | ||
except ImportError: | ||
cmdclass = {} | ||
|
||
|
||
setup(name='Ska.tdb', | ||
author='Tom Aldcroft', | ||
url="http://cxc.harvard.edu/mta/ASPECT/tool_doc/pydocs/Ska.tdb", | ||
description='Access to Chandra Telemetry Database (TDB)', | ||
author_email='aldcroft@head.cfa.harvard.edu', | ||
version=version, | ||
author_email='taldcroft@cfa.harvard.edu', | ||
version=__version__, | ||
zip_safe=False, | ||
packages=['Ska', 'Ska.tdb', 'Ska.tdb.tests'], | ||
package_dir={'Ska.tdb': 'Ska/tdb'}, | ||
tests_require=['pytest'], | ||
cmdclass={'test': PyTest} | ||
cmdclass=cmdclass, | ||
) |