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 doc *
|
||||||
recursive-include config *
|
recursive-include timmy_data *
|
||||||
include README.md
|
include README.md
|
||||||
|
14
setup.py
14
setup.py
@ -21,16 +21,11 @@ import os
|
|||||||
from timmy.env import project_name, version
|
from timmy.env import project_name, version
|
||||||
|
|
||||||
pname = project_name
|
pname = project_name
|
||||||
dtm = os.path.join(os.path.abspath(os.sep), 'usr', 'share', pname)
|
include_package_data = True
|
||||||
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
|
|
||||||
|
|
||||||
if os.environ.get("READTHEDOCS", False):
|
if os.environ.get("READTHEDOCS", False):
|
||||||
rqfiles = None
|
rqfiles = None
|
||||||
package_data = False
|
include_package_data = False
|
||||||
|
|
||||||
|
|
||||||
setup(name=pname,
|
setup(name=pname,
|
||||||
@ -43,10 +38,9 @@ setup(name=pname,
|
|||||||
'operations: two-way data transfer, log collection, '
|
'operations: two-way data transfer, log collection, '
|
||||||
'remote command execution'),
|
'remote command execution'),
|
||||||
long_description=open('README.md').read(),
|
long_description=open('README.md').read(),
|
||||||
packages=[pname],
|
packages=[pname, '%s_data' % pname],
|
||||||
install_requires=['pyyaml'],
|
install_requires=['pyyaml'],
|
||||||
data_files=rqfiles,
|
include_package_data=include_package_data,
|
||||||
include_package_data=package_data,
|
|
||||||
entry_points={'console_scripts': ['%s=%s.cli:main' % (pname, pname)]},
|
entry_points={'console_scripts': ['%s=%s.cli:main' % (pname, pname)]},
|
||||||
setup_requires=['pytest-runner'],
|
setup_requires=['pytest-runner'],
|
||||||
tests_require=['pytest']
|
tests_require=['pytest']
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
from tools import load_yaml_file
|
from tools import load_yaml_file
|
||||||
from tempfile import gettempdir
|
from tempfile import gettempdir
|
||||||
import os
|
import os
|
||||||
|
from pkg_resources import resource_filename as resource_fn
|
||||||
|
from timmy.env import project_name
|
||||||
|
|
||||||
|
|
||||||
def load_conf(filename):
|
def load_conf(filename):
|
||||||
@ -47,11 +49,8 @@ def load_conf(filename):
|
|||||||
conf['prefix'] = 'nice -n 19 ionice -c 3'
|
conf['prefix'] = 'nice -n 19 ionice -c 3'
|
||||||
rqdir = 'rq'
|
rqdir = 'rq'
|
||||||
rqfile = 'default.yaml'
|
rqfile = 'default.yaml'
|
||||||
dtm = os.path.join(os.path.abspath(os.sep), 'usr', 'share', 'timmy')
|
data_package = '%s_data' % project_name
|
||||||
if os.path.isdir(os.path.join(dtm, rqdir)):
|
conf['rqdir'] = os.path.join(resource_fn(data_package, rqdir))
|
||||||
conf['rqdir'] = os.path.join(dtm, rqdir)
|
|
||||||
else:
|
|
||||||
conf['rqdir'] = rqdir
|
|
||||||
conf['rqfile'] = [{'file': os.path.join(conf['rqdir'], rqfile),
|
conf['rqfile'] = [{'file': os.path.join(conf['rqdir'], rqfile),
|
||||||
'default': True}]
|
'default': True}]
|
||||||
conf['compress_timeout'] = 3600
|
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