-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·64 lines (51 loc) · 1.87 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·64 lines (51 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python
# coding=utf-8
import os
import clara_bootstrap
from distutils.core import setup, Command
from setuptools.command.test import test as TestCommand
from setuptools import find_packages
class ClaraTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
pytest.main(self.test_args)
class ClaraClean(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./.cache ./.eggs ./build ./dist')
os.system('rm -vrf ./*.tgz ./*.egg-info')
os.system('find . -name "*.pyc" -exec rm -vrf {} \;')
os.system('find . -name "__pycache__" -exec rm -rf {} \;')
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme_file:
README = readme_file.read()
with open(os.path.join(os.path.dirname(__file__), 'LICENSE')) as license_file:
LICENSE = license_file.read()
if __name__ == "__main__":
setup(name='clara_bootstrap',
version=clara_bootstrap.__version__,
description='Clara bootstrap scripts',
author='Ricardo Oyarzun',
author_email='oyarzun@jlab.org',
include_package_data=True,
url='https://claraweb.jlab.org',
license=LICENSE,
long_description=README,
test_suite="tests",
tests_require=['pytest'],
cmdclass={
'test': ClaraTest,
'clean': ClaraClean,
},
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*",
"tests", "examples", "examples.*"]),
package_dir={"clara_bootstrap": "clara_bootstrap"},
scripts=['clara_bootstrap/scripts/clara']
)