Loading .conda-recipe/bld.bat 0 → 100644 +15 −0 Changes for .conda-recipe/bld.bat: 15 added lines, 0 removed lines. Original line number Diff line number Diff line REM Generate `setup.py` from `pavement.py` definition. "%PYTHON%" -m paver generate_setup REM **Workaround** `conda build` runs a copy of `setup.py` named REM `conda-build-script.py` with the recipe directory as the only argument. REM This causes paver to fail, since the recipe directory is not a valid paver REM task name. REM REM We can work around this by wrapping the original contents of `setup.py` in REM an `if` block to only execute during package installation. "%PYTHON%" -c "input_ = open('setup.py', 'r'); data = input_.read(); input_.close(); output_ = open('setup.py', 'w'); output_.write('\n'.join(['import sys', 'import path_helpers as ph', '''if ph.path(sys.argv[0]).name == 'conda-build-script.py':''', ' sys.argv.pop()', 'else:', '\n'.join([(' ' + d) for d in data.splitlines()])])); output_.close(); print open('setup.py', 'r').read()" REM Install source directory as Python package. "%PYTHON%" -m pip install --no-cache --find-links http://192.99.4.95/wheels --trusted-host 192.99.4.95 . if errorlevel 1 exit 1 .conda-recipe/meta.yaml 0 → 100644 +52 −0 Changes for .conda-recipe/meta.yaml: 52 added lines, 0 removed lines. Original line number Diff line number Diff line # source will be downloaded prior to filling in jinja templates # Example assumes that this folder has setup.py in it source: git_url: ../ package: name: dstat-interface {% if GIT_DESCRIBE_NUMBER > '0' %} version: {{ GIT_DESCRIBE_TAG[1:] }}.post{{ GIT_DESCRIBE_NUMBER }} {% else %} version: {{ GIT_DESCRIBE_TAG[1:] }} {% endif %} build: entry_points: - dstat-interface = dstat_interface.main:main # If this is a new build for the same version, increment the build # number. If you do not include this key, it defaults to 0. number: 0 requirements: build: - python - paver - path_helpers - matplotlib - pandas - psutil - pycairo-gtk2 - pyserial - pyyaml - pyzmq - seaborn - si-prefix - zeo - zmq-plugin - zodb run: - matplotlib - pandas - psutil - pycairo-gtk2 - pyserial - pyyaml - pyzmq - seaborn - si-prefix - zeo - zmq-plugin - zodb dstat_interface/main.py +15 −2 Changes for dstat_interface/main.py: 15 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -65,7 +65,16 @@ except ImportError: sys.exit(1) from serial import SerialException import logging os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # Add package directory to Python path. # # This is required for relative imports, which are required for running under a # `multiprocessing` process. parent_dir = os.path.abspath(os.path.dirname(__file__)) if parent_dir not in sys.path: sys.path.insert(0, parent_dir) # Change directory into package parent directory to support loading glade UI # files using relative paths. os.chdir(parent_dir) from version import getVersion import interface.save as save Loading Loading @@ -1031,8 +1040,12 @@ class Main(object): self.plugin = None if __name__ == "__main__": def main(): multiprocessing.freeze_support() gobject.threads_init() MAIN = Main() gtk.main() if __name__ == "__main__": main() Loading
.conda-recipe/bld.bat 0 → 100644 +15 −0 Changes for .conda-recipe/bld.bat: 15 added lines, 0 removed lines. Original line number Diff line number Diff line REM Generate `setup.py` from `pavement.py` definition. "%PYTHON%" -m paver generate_setup REM **Workaround** `conda build` runs a copy of `setup.py` named REM `conda-build-script.py` with the recipe directory as the only argument. REM This causes paver to fail, since the recipe directory is not a valid paver REM task name. REM REM We can work around this by wrapping the original contents of `setup.py` in REM an `if` block to only execute during package installation. "%PYTHON%" -c "input_ = open('setup.py', 'r'); data = input_.read(); input_.close(); output_ = open('setup.py', 'w'); output_.write('\n'.join(['import sys', 'import path_helpers as ph', '''if ph.path(sys.argv[0]).name == 'conda-build-script.py':''', ' sys.argv.pop()', 'else:', '\n'.join([(' ' + d) for d in data.splitlines()])])); output_.close(); print open('setup.py', 'r').read()" REM Install source directory as Python package. "%PYTHON%" -m pip install --no-cache --find-links http://192.99.4.95/wheels --trusted-host 192.99.4.95 . if errorlevel 1 exit 1
.conda-recipe/meta.yaml 0 → 100644 +52 −0 Changes for .conda-recipe/meta.yaml: 52 added lines, 0 removed lines. Original line number Diff line number Diff line # source will be downloaded prior to filling in jinja templates # Example assumes that this folder has setup.py in it source: git_url: ../ package: name: dstat-interface {% if GIT_DESCRIBE_NUMBER > '0' %} version: {{ GIT_DESCRIBE_TAG[1:] }}.post{{ GIT_DESCRIBE_NUMBER }} {% else %} version: {{ GIT_DESCRIBE_TAG[1:] }} {% endif %} build: entry_points: - dstat-interface = dstat_interface.main:main # If this is a new build for the same version, increment the build # number. If you do not include this key, it defaults to 0. number: 0 requirements: build: - python - paver - path_helpers - matplotlib - pandas - psutil - pycairo-gtk2 - pyserial - pyyaml - pyzmq - seaborn - si-prefix - zeo - zmq-plugin - zodb run: - matplotlib - pandas - psutil - pycairo-gtk2 - pyserial - pyyaml - pyzmq - seaborn - si-prefix - zeo - zmq-plugin - zodb
dstat_interface/main.py +15 −2 Changes for dstat_interface/main.py: 15 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -65,7 +65,16 @@ except ImportError: sys.exit(1) from serial import SerialException import logging os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # Add package directory to Python path. # # This is required for relative imports, which are required for running under a # `multiprocessing` process. parent_dir = os.path.abspath(os.path.dirname(__file__)) if parent_dir not in sys.path: sys.path.insert(0, parent_dir) # Change directory into package parent directory to support loading glade UI # files using relative paths. os.chdir(parent_dir) from version import getVersion import interface.save as save Loading Loading @@ -1031,8 +1040,12 @@ class Main(object): self.plugin = None if __name__ == "__main__": def main(): multiprocessing.freeze_support() gobject.threads_init() MAIN = Main() gtk.main() if __name__ == "__main__": main()