diff --git a/debian/rules b/debian/rules index ccf6038..51a6150 100755 --- a/debian/rules +++ b/debian/rules @@ -1,24 +1,27 @@ #!/usr/bin/make -f export DH_VERBOSE = 1 export SETUPTOOLS_DEB_LAYOUT = 1 export DH_VIRTUALENV_INSTALL_ROOT = /usr/lib/python3/dist-packages -export DH_VIRTUALENV_ARGUMENTS := --python python3 +export DH_VIRTUALENV_ARGUMENTS := --always-copy --python python3 --system-site-packages export DH_REQUIREMENTS_FILE := debian-requirements.txt %: dh $@ --buildsystem dh_virtualenv override_dh_python3: dh_python3 --shebang=/usr/lib/python3/dist-packages/sylk-pushserver/bin/python3 override_dh_clean: dh_clean rm -rf build dist MANIFEST override_dh_install: dh_install py3clean . override_dh_installsystemd: dh_installsystemd -psylk-pushserver --name=sylk-pushserver --no-start + +override_dh_auto_test: + diff --git a/__info__.py b/pushserver/__info__.py similarity index 100% rename from __info__.py rename to pushserver/__info__.py diff --git a/setup.py b/setup.py index 7cbbd3c..0895dce 100755 --- a/setup.py +++ b/setup.py @@ -1,54 +1,54 @@ #!/usr/bin/python3 import glob +import os from setuptools import setup -import __info__ as package_info +import pushserver.__info__ as package_info long_description = """ Sylk Pushserver was designed to act as a central dispatcher for mobile push notifications inside RTC provider infrastructures. Both the provider and the mobile application customer, in the case of a shared infrastructure, can easily audit problems related to the processing of push notifications. """ +def find_packages(root): + return [directory.replace(os.path.sep, '.') for directory, sub_dirs, files in os.walk(root) if '__init__.py' in files] def requirements(): install_requires = [] with open('requirements.txt') as f: for line in f: install_requires.append(line.strip()) return install_requires setup(name=package_info.__project__, version=package_info.__version__, description=package_info.__summary__, long_description=long_description, author=package_info.__author__, license=package_info.__license__, platforms=['Platform Independent'], author_email=package_info.__email__, url=package_info.__webpage__, scripts=['sylk-pushserver', 'scripts/sylk-pushclient'], - packages=['pushserver/api', - 'pushserver/api/errors', 'pushserver/api/routes', - 'pushserver/applications', 'pushserver/models', - 'pushserver/resources', 'pushserver/pns'], - install_requires=requirements(), + packages=find_packages('pushserver'), + # install_requires=requirements(), classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Service Providers', 'License :: GPL v3', 'Operating System :: OS Independent', 'Programming Language :: Python', ], data_files=[('/etc/sylk-pushserver', []), ('/etc/sylk-pushserver', glob.glob('config/*.sample')), ('/etc/sylk-pushserver/credentials', []), ('/etc/sylk-pushserver/applications', glob.glob('config/applications/*.py')), ('/etc/sylk-pushserver/applications/app_template', glob.glob('config/applications/app_template/*.py')), ('/var/log/sylk-pushserver', [])] )