Fix: wheel support
Change-Id: I6f5912d1fb0cdb583907ded078167cd877097c37
This commit is contained in:
parent
03def584a9
commit
e493b44a4d
@ -1,4 +1,3 @@
|
||||
recursive-include rq *
|
||||
recursive-include doc *
|
||||
recursive-include config *
|
||||
recursive-include timmy_data *
|
||||
include README.md
|
||||
|
14
setup.py
14
setup.py
@ -21,16 +21,11 @@ import os
|
||||
from timmy.env import project_name, version
|
||||
|
||||
pname = project_name
|
||||
dtm = os.path.join(os.path.abspath(os.sep), 'usr', 'share', pname)
|
||||
rqfiles = [(os.path.join(dtm, root), [os.path.join(root, f) for f in files])
|
||||
for root, dirs, files in os.walk('rq')]
|
||||
rqfiles.append((os.path.join(dtm, 'config'),
|
||||
[os.path.join('config', 'example.yaml')]))
|
||||
package_data = True
|
||||
include_package_data = True
|
||||
|
||||
if os.environ.get("READTHEDOCS", False):
|
||||
rqfiles = None
|
||||
package_data = False
|
||||
include_package_data = False
|
||||
|
||||
|
||||
setup(name=pname,
|
||||
@ -43,10 +38,9 @@ setup(name=pname,
|
||||
'operations: two-way data transfer, log collection, '
|
||||
'remote command execution'),
|
||||
long_description=open('README.md').read(),
|
||||
packages=[pname],
|
||||
packages=[pname, '%s_data' % pname],
|
||||
install_requires=['pyyaml'],
|
||||
data_files=rqfiles,
|
||||
include_package_data=package_data,
|
||||
include_package_data=include_package_data,
|
||||
entry_points={'console_scripts': ['%s=%s.cli:main' % (pname, pname)]},
|
||||
setup_requires=['pytest-runner'],
|
||||
tests_require=['pytest']
|
||||
|
@ -18,6 +18,8 @@
|
||||
from tools import load_yaml_file
|
||||
from tempfile import gettempdir
|
||||
import os
|
||||
from pkg_resources import resource_filename as resource_fn
|
||||
from timmy.env import project_name
|
||||
|
||||
|
||||
def load_conf(filename):
|
||||
@ -47,11 +49,8 @@ def load_conf(filename):
|
||||
conf['prefix'] = 'nice -n 19 ionice -c 3'
|
||||
rqdir = 'rq'
|
||||
rqfile = 'default.yaml'
|
||||
dtm = os.path.join(os.path.abspath(os.sep), 'usr', 'share', 'timmy')
|
||||
if os.path.isdir(os.path.join(dtm, rqdir)):
|
||||
conf['rqdir'] = os.path.join(dtm, rqdir)
|
||||
else:
|
||||
conf['rqdir'] = rqdir
|
||||
data_package = '%s_data' % project_name
|
||||
conf['rqdir'] = os.path.join(resource_fn(data_package, rqdir))
|
||||
conf['rqfile'] = [{'file': os.path.join(conf['rqdir'], rqfile),
|
||||
'default': True}]
|
||||
conf['compress_timeout'] = 3600
|
||||
|
0
timmy_data/__init__.py
Normal file
0
timmy_data/__init__.py
Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user