9
0
Fork 0

improved setup.py

This commit is contained in:
Alton MacDonald 2014-08-12 17:04:23 +02:00
parent 6f15ea9bd5
commit 624ac1f766
2 changed files with 29 additions and 20 deletions

View File

@ -46,10 +46,9 @@ Installation & Configuration:
you can add your Provider Details at the end of hlr_mgmt/mcc_mnc.csv following the format:
MCC,MNC,Network,Operator,Status
2) Install the python dependencies
2) Install osmo-oohmi. This installation process resolves all the required dependencies and sets up its init scripts.
sudo python setup.py install
cp production.ini /etc/openbsc/production.ini
3) Verify installation:
@ -57,21 +56,17 @@ Installation & Configuration:
If the above command generates errors, try to fix these before running the software
4) Run the Server:
4) Run the Server for the first time:
/etc/init.d/osmocom-oohmi start
OPTIONAL DEVELOPER INFO:
the server can also be invoked manually as shown below
cd /etc/openbsc/
# pserve is a nice python daemonizing function, customize the execution of the hlr_mgmt module by changing runtime flags.
pserve --help
pserve production.ini start
cd /etc/openbsc/
pserve production.ini start
OPTIONAL:
pserve is a nice python daemonizing function, customize the execution of the hlr_mgmt module by changing runtime flags.
pserver --help
5) Install init script
sudo cp osmocom-oohmi /etc/init.d/osmocom-oohmi
sudo update-rc.d osmocom-oohmi defaults
6) Access the Web Interface
5) Access the Web Interface
http://localhost:8080/

View File

@ -20,10 +20,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###
import os
import os, sys
import multiprocessing
from setuptools import setup, find_packages
from setuptools.command.install import install
class custom_install(install):
def run(self):
from subprocess import call
install.run(self)
call(['/usr/sbin/update-rc.d', 'osmocom-oohmi', 'defaults'])
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
@ -38,22 +45,28 @@ requires = [
'nose',
'coverage'
]
data_files=[('/etc/openbsc', ['production.ini']),
('/etc/init.d', ['osmocom-oohmi'])]
setup(name='osmo_oohmi',
version='0.0',
description='osmo_oohmi',
long_description=README + '\n\n' + CHANGES,
license='AGPLv3',
classifiers=[
"Programming Language :: Python",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
"License :: OSI Approved :: GNU Affero General Public License v3",
],
author='Alton MacDonald',
author_email='alton.kenneth.macdonald@fokus.fraunhofer.de',
url='',
keywords='web pyramid pylons',
url='http://git.osmocom.org/python/osmo-oohmi/',
keywords='openbsc web pyramid pylons',
packages=find_packages(),
data_files=data_files,
include_package_data=True,
zip_safe=False,
install_requires=requires,
@ -63,4 +76,5 @@ setup(name='osmo_oohmi',
[paste.app_factory]
main = hlr_mgmt:main
""",
cmdclass={'install': custom_install}
)