Skip to content
Snippets Groups Projects
Commit c7994dff authored by Johannes Schumann's avatar Johannes Schumann
Browse files

Retreive image automatically while package installation

parent 3f727258
No related branches found
No related tags found
1 merge request!1Merge python environment
......@@ -6,11 +6,6 @@ KM3BUU setup script.
"""
from setuptools import setup, find_packages
from setuptools.command.install import install
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
PACKAGE_NAME = 'km3buu'
URL = 'https://git.km3net.de/simulation/km3buu'
DESCRIPTION = 'GiBUU tools for KM3NeT'
......@@ -18,13 +13,20 @@ __author__ = 'Johannes Schumann'
__email__ = 'jschumann@km3net.de'
import os
from setuptools import setup, find_packages
from setuptools.command.install import install
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
from spython.main import Client
with open('requirements.txt') as fobj:
REQUIREMENTS = [l.strip() for l in fobj.readlines()]
def _build_image():
os.system('make buildremote')
docker_url = "docker://docker.km3net.de/simulation/km3buu"
image_name = "GiBUU.simg"
Client.pull(docker_url, name=image_name)
class CustomInstallCmd(install):
......@@ -54,9 +56,11 @@ setup(
packages=find_packages(),
include_package_data=True,
platforms='any',
cmdclass={'install': CustomInstallCmd,
'develop': CustomDevelopCmd,
'egg_info': CustomEggInfoCmd},
cmdclass={
'install': CustomInstallCmd,
'develop': CustomDevelopCmd,
'egg_info': CustomEggInfoCmd
},
setup_requires=['setuptools_scm'],
use_scm_version={
'write_to': '{}/version.txt'.format(PACKAGE_NAME),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment