Fix: wheel support

Change-Id: I6f5912d1fb0cdb583907ded078167cd877097c37
This commit is contained in:
Dmitry Sutyagin 2016-09-21 14:43:43 +03:00
parent 03def584a9
commit e493b44a4d
138 changed files with 9 additions and 17 deletions

View File

@ -1,4 +1,3 @@
recursive-include rq *
recursive-include doc *
recursive-include config *
recursive-include timmy_data *
include README.md

View File

@ -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']

View File

@ -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
View File

Some files were not shown because too many files have changed in this diff Show More