Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda package #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ ENV/

# Rope project settings
.ropeproject

# JetBrain
.idea
8 changes: 6 additions & 2 deletions PyPLC/PyPLC.py
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ def __init__(self, name):
# PyPLC class main method
#
#==================================================================
if __name__ == '__main__':
def main():
try:
py = ('PyUtil' in dir(PyTango) and PyTango.PyUtil or PyTango.Util)(sys.argv)
from fandango.interface import FullTangoInheritance
Expand All @@ -1811,7 +1811,11 @@ def __init__(self, name):
except Exception,e:
print '__main__ -------> An unforeseen exception occured....',e
traceback.print_exc()



if __name__ == '__main__':
main()

else:
from fandango.interface import FullTangoInheritance
PyPLC,PyPLCClass = FullTangoInheritance('PyPLC',PyPLC,PyPLCClass,DynamicDS,DynamicDSClass,Exclude=['Lock','Unlock','isLocked'],ForceDevImpl=True)
Expand Down
6 changes: 6 additions & 0 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
python:
- 2.7

numpy:
- 1.11

49 changes: 49 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% set data = load_setup_py_data(setup_file="../setup.py",
from_recipe_dir=True) %}

{% set GIT_HASHTAG = os.popen("git log --pretty=format:'%h' -n 1" )
.read().strip()%}

package:
name: {{ data.get('name') }}
version: {{ data.get('version') }}

source:
path: ..

build:
number: {{environ.get('BUILD_NUMBER',0)}}
noarch: python
script: '{{PYTHON}} setup.py install --single-version-externally-managed
--record=record.txt'

string: 'py{{CONDA_PY}}_{{ PKG_BUILDNUM }}_g{{GIT_HASHTAG}}'
entry_points: {{data.get('entry_points', {}).get('console_scripts', [])}}

requirements:
host:
- python {{python}}
- setuptools
run:
- python {{python}}
- fandango
- pytango

test:
requires:
- fandango
- pytango
imports:
{% for pack in data['packages'] %}
- {{pack}}
{% endfor %}

about:
home: {{ data.get('url')}}
license: {{ data.get('license')}}
summary: {{ data.get('description')}}
author: {{ data.get('author')}}
description: {{ data.get('long_description')}}



9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
-------------------------------------------------------------------------------
"""

print(__doc__)
# print(__doc__)

version = str(open('PyPLC/VERSION').read().strip())
scripts = ['bin/PyPLC']
license = 'GPL-3.0'

package_dir = {'PyPLC': 'PyPLC',}
Expand All @@ -41,7 +40,11 @@
description = 'Tango device for Modbus equipment',
packages = packages,
package_dir= package_dir,
scripts = scripts,
entry_points={
'console_scripts': [
'PyPLC = PyPLC.PyPLC:main'
]
},
include_package_data = True,
package_data = package_data,
install_requires=['fandango>=14.6.0','PyTango'],
Expand Down