Skip to content

Commit 73140a2

Browse files
authored
Merge pull request #279 from mpsonntag/picks_1.3.4
[1.3.4] Installation fixes LGTM
2 parents fb61e96 + 320b02e commit 73140a2

File tree

7 files changed

+88
-32
lines changed

7 files changed

+88
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dist
77
build
88
eggs
99
parts
10+
.cache
1011

1112
# odml files
1213
*.odml

.travis.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,44 @@ matrix:
2525
# env:
2626
# - OSXENV=2.7
2727

28-
before_install:
29-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash resources/install_osx_virtualenv.sh; fi
30-
3128
install:
3229
- export PYVER=${TRAVIS_PYTHON_VERSION:0:1}
30+
- if [ $PYVER = 3 ]; then
31+
export PYCMD=python3;
32+
export PIPCMD=pip3;
33+
else
34+
export PYCMD=python;
35+
export PIPCMD=pip;
36+
fi;
37+
3338
- if [ $COVERALLS = 1 ]; then
34-
pip install --upgrade coveralls;
39+
$PIPCMD install --upgrade coveralls;
3540
fi;
41+
3642
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
37-
which python;
38-
source venv/bin/activate;
39-
which python;
40-
fi
41-
- pip install lxml enum34 pyyaml
43+
if [[ "$OSXENV" == "2.7" ]]; then
44+
brew install python@2;
45+
virtualenv venv -p python;
46+
source venv/bin/activate;
47+
export PYCMD=python;
48+
export PIPCMD=pip;
49+
else
50+
brew upgrade python;
51+
source venv/bin/activate;
52+
export PYCMD=python3;
53+
export PIPCMD=pip3;
54+
fi;
55+
fi;
56+
57+
- $PIPCMD install lxml enum34 pyyaml rdflib
4258

4359
script:
44-
- which python
45-
- python setup.py build
60+
- which $PYCMD
61+
- $PYCMD setup.py build
4662
- if [ $COVERALLS = 1 ]; then
4763
coverage${PYVER} run --source=odml setup.py test && coverage${PYVER} report -m;
4864
else
49-
python setup.py test;
65+
$PYCMD setup.py test;
5066
fi;
5167

5268
after_success:

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include LICENSE
22
include README.rst
3-
include odml.desktop
3+
include odml/info.json

README.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55
.. image:: https://coveralls.io/repos/github/G-Node/python-odml/badge.svg?branch=master
66
:target: https://coveralls.io/github/G-Node/python-odml?branch=master
77

8-
odML libraries and editor
9-
=========================
8+
odML (Open metaData Markup Language) core library
9+
=================================================
10+
11+
The open metadata Markup Language is a file based format (XML, JSON, YAML) for storing
12+
metadata in an organised human- and machine-readable way. odML is an initiative to define
13+
and establish an open, flexible, and easy-to-use format to transport metadata.
14+
15+
The Python-odML library can be easily installed via :code:`pip`. The source code is freely
16+
available on `GitHub <https://github.com/G-Node/python-odml>`_. If you are not familiar
17+
with the version control system **git**, but still want to use it, have a look at the
18+
documentation available on the `git-scm website <https://git-scm.com/>`_.
1019

1120
Dependencies
1221
------------
@@ -74,4 +83,5 @@ Bugs & Questions
7483
Should you find a behaviour that is likely a bug, please file a bug report at
7584
`the github bug tracker <https://github.com/G-Node/python-odml/issues>`_.
7685

77-
If you have questions regarding the use of the library or the editor, feel free to join the `#gnode <http://webchat.freenode.net?channels=%23gnode>`_ IRC channel on freenode.
86+
If you have questions regarding the use of the library, feel free to join the
87+
`#gnode <http://webchat.freenode.net?channels=%23gnode>`_ IRC channel on freenode.

odml/info.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"VERSION": "1.3.4",
3+
"FORMAT_VERSION": "1",
4+
"AUTHOR": "Hagen Fritsch, Christian Kellner, Jan Grewe, Achilleas Koutsou, Michael Sonntag, Lyuba Zehl",
5+
"COPYRIGHT": "(c) 2011-2018, German Neuroinformatics Node",
6+
"CONTACT": "[email protected]",
7+
"HOMEPAGE": "https://github.com/G-Node/python-odml",
8+
"CLASSIFIERS": [
9+
"Programming Language :: Python :: 2",
10+
"Programming Language :: Python :: 3",
11+
"License :: OSI Approved :: BSD License",
12+
"Development Status :: 5 - Production/Stable",
13+
"Topic :: Scientific/Engineering",
14+
"Intended Audience :: Science/Research"
15+
]
16+
}

odml/info.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
VERSION = '1.3.3'
2-
FORMAT_VERSION = '1'
3-
AUTHOR = 'Hagen Fritsch, Christian Kellner, Jan Grewe, ' \
4-
'Achilleas Koutsou, Michael Sonntag, Lyuba Zehl'
5-
COPYRIGHT = '(c) 2011-2017, German Neuroinformatics Node'
6-
CONTACT = '[email protected]'
7-
HOMEPAGE = 'https://github.com/G-Node/python-odml'
8-
CLASSIFIERS = [
9-
'Programming Language :: Python :: 2',
10-
'Programming Language :: Python :: 3',
11-
'License :: OSI Approved :: BSD License',
12-
'Development Status :: 5 - Production/Stable',
13-
'Topic :: Scientific/Engineering',
14-
'Intended Audience :: Science/Research'
15-
]
1+
import os
2+
import json
3+
4+
here = os.path.dirname(__file__)
5+
6+
with open(os.path.join(here, "info.json")) as infofile:
7+
infodict = json.load(infofile)
8+
9+
VERSION = infodict["VERSION"]
10+
FORMAT_VERSION = infodict["FORMAT_VERSION"]
11+
AUTHOR = infodict["AUTHOR"]
12+
COPYRIGHT = infodict["COPYRIGHT"]
13+
CONTACT = infodict["CONTACT"]
14+
HOMEPAGE = infodict["HOMEPAGE"]
15+
CLASSIFIERS = infodict["CLASSIFIERS"]

setup.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1+
import json
2+
import os
13
import sys
24
try:
35
from setuptools import setup
46
except ImportError as ex:
57
from distutils.core import setup
6-
from odml.info import AUTHOR, CONTACT, CLASSIFIERS, HOMEPAGE, VERSION
8+
9+
with open(os.path.join("odml", "info.json")) as infofile:
10+
infodict = json.load(infofile)
11+
12+
VERSION = infodict["VERSION"]
13+
FORMAT_VERSION = infodict["FORMAT_VERSION"]
14+
AUTHOR = infodict["AUTHOR"]
15+
COPYRIGHT = infodict["COPYRIGHT"]
16+
CONTACT = infodict["CONTACT"]
17+
HOMEPAGE = infodict["HOMEPAGE"]
18+
CLASSIFIERS = infodict["CLASSIFIERS"]
719

820
packages = [
921
'odml',
@@ -27,6 +39,7 @@
2739
packages=packages,
2840
test_suite='test',
2941
install_requires=install_req,
42+
include_package_data=True,
3043
long_description=description_text,
3144
classifiers=CLASSIFIERS,
3245
license="BSD"

0 commit comments

Comments
 (0)