improved setup.py
This commit is contained in:
parent
6f15ea9bd5
commit
624ac1f766
29
README.txt
29
README.txt
|
@ -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/
|
||||
|
|
20
setup.py
20
setup.py
|
@ -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}
|
||||
)
|
||||
|
|
Reference in New Issue