1- from __future__ import absolute_import , print_function
2-
3- import os .path
4- import re
5- import subprocess
6- from setuptools import setup , find_packages
7-
8- def get_version ():
9- """Get version from git or file system.
10-
11- If this is a git repository, try to get the version number by
12- running ``git describe``, then store it in
13- bioformats/_version.py. Otherwise, try to load the version number
14- from that file. If both methods fail, quietly return None.
15-
16- """
17- git_version = None
18- if os .path .exists (os .path .join (os .path .dirname (__file__ ), '.git' )):
19- import subprocess
20- try :
21- git_version = subprocess .check_output (['git' , 'describe' ]).strip ()
22- except :
23- pass
24-
25- version_file = os .path .join (os .path .dirname (__file__ ), 'bioformats' ,
26- '_version.py' )
27- if os .path .exists (version_file ):
28- with open (version_file ) as f :
29- cached_version_line = f .read ().strip ()
30- try :
31- # From http://stackoverflow.com/a/3619714/17498
32- cached_version = re .search (r"^__version__ = ['\"]([^'\"]*)['\"]" ,
33- cached_version_line , re .M ).group (1 )
34- except :
35- raise RuntimeError ("Unable to find version in %s" % version_file )
36- else :
37- cached_version = None
38-
39- if git_version and git_version != cached_version :
40- with open (version_file , 'w' ) as f :
41- print ('__version__ = "%s"' % git_version , file = f )
42-
43- return git_version or cached_version
44-
45- setup (
46- name = "python-bioformats" ,
47- version = get_version ().decode ("utf-8" ),
1+ import setuptools
2+
3+ setuptools .setup (
4+ classifiers = [
5+ "Development Status :: 5 - Production/Stable" ,
6+ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)" ,
7+ "Programming Language :: Python :: 2" ,
8+ "Programming Language :: Python :: 3" ,
9+ "Programming Language :: Java" ,
10+ "Topic :: Scientific/Engineering :: Bio-Informatics" ,
11+ "Topic :: Multimedia :: Graphics :: Graphics Conversion"
12+ ],
4813 description = "Read and write life sciences file formats" ,
49- long_description = '''Python-bioformats is a Python wrapper for Bio-Formats, a standalone
50- Java library for reading and writing life sciences image file
51- formats. Bio-Formats is capable of parsing both pixels and
52- metadata for a large number of formats, as well as writing to
53- several formats. Python-bioformats uses the python-javabridge to
54- start a Java virtual machine from Python and interact with
55- it. Python-bioformats was developed for and is used by the cell
56- image analysis software CellProfiler (cellprofiler.org).''' ,
14+ install_requires = [
15+ "javabridge>=1.0"
16+ ],
17+ license = "GPL License" ,
18+ long_description = """Python-bioformats is a Python wrapper for Bio-Formats, a standalone Java library for reading
19+ and writing life sciences image file formats. Bio-Formats is capable of parsing both pixels and metadata for a
20+ large number of formats, as well as writing to several formats. Python-bioformats uses the python-javabridge to
21+ start a Java virtual machine from Python and interact with it. Python-bioformats was developed for and is used by
22+ the cell image analysis software CellProfiler (cellprofiler.org).""" ,
23+ name = "python-bioformats" ,
24+ package_data = {
25+ "bioformats" : [
26+ "jars/*.jar"
27+ ]
28+ },
29+ packages = [
30+ "bioformats"
31+ ],
5732 url = "http://github.com/CellProfiler/python-bioformats/" ,
58- packages = ['bioformats' ],
59- classifiers = ['Development Status :: 5 - Production/Stable' ,
60- 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)' ,
61- 'Programming Language :: Python :: 2' ,
62- 'Programming Language :: Python :: 3' ,
63- 'Programming Language :: Java' ,
64- 'Topic :: Scientific/Engineering :: Bio-Informatics' ,
65- 'Topic :: Multimedia :: Graphics :: Graphics Conversion'
66- ],
67- license = 'GPL License' ,
68- package_data = {'bioformats' : ['jars/*.jar' ]},
69- install_requires = ['javabridge>=1.0' ]
70- )
71-
33+ version = "1.0.9"
34+ )
0 commit comments