Skip to content

Commit

Permalink
fix entry_points in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey committed Dec 14, 2017
1 parent 5d44649 commit c761bae
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 13 deletions.
13 changes: 13 additions & 0 deletions h5json/h5tojson/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
##############################################################################
# Copyright by The HDF Group. #
# All rights reserved. #
# #
# This file is part of H5Serv (HDF5 REST Server) Service, Libraries and #
# Utilities. The full HDF5 REST Server copyright notice, including #
# terms governing use, modification, and redistribution, is contained in #
# the file COPYING, which can be found at the root of the source code #
# distribution tree. If you do not have access to this file, you may #
# request a copy from [email protected]. #
##############################################################################

from __future__ import absolute_import
3 changes: 2 additions & 1 deletion h5tojson/h5tojson.py → h5json/h5tojson/h5tojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,5 @@ def main():
dumper.dumpFile()


main()
if __name__ == "__main__":
main()
13 changes: 13 additions & 0 deletions h5json/jsontoh5/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
##############################################################################
# Copyright by The HDF Group. #
# All rights reserved. #
# #
# This file is part of H5Serv (HDF5 REST Server) Service, Libraries and #
# Utilities. The full HDF5 REST Server copyright notice, including #
# terms governing use, modification, and redistribution, is contained in #
# the file COPYING, which can be found at the root of the source code #
# distribution tree. If you do not have access to this file, you may #
# request a copy from [email protected]. #
##############################################################################

from __future__ import absolute_import
5 changes: 2 additions & 3 deletions jsontoh5/jsontoh5.py → h5json/jsontoh5/jsontoh5.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ def writeFile(self):
self.createLinks() # link it all together

def main():

parser = argparse.ArgumentParser(usage='%(prog)s [-h] <json_file> <h5_file>')
parser.add_argument('in_filename', nargs='+', help='JSon file to be converted to h5')
parser.add_argument('out_filename', nargs='+', help='name of HDF5 output file')
Expand Down Expand Up @@ -276,5 +275,5 @@ def main():

print("done!")


main()
if __name__ == "__main__":
main()
20 changes: 11 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
Expand All @@ -23,7 +23,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.1.1',
version='1.1.2',

description='HDF5/JSON Tools',
long_description=long_description,
Expand Down Expand Up @@ -62,14 +62,16 @@
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],

# What does your project relate to?
keywords='json hdf5 numpy array data',

# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=find_packages(exclude=['docs', 'test*']),
#packages=find_packages(exclude=['docs', 'test*']),
packages=['h5json','h5json.h5tojson','h5json.jsontoh5'],

# Alternatively, if you want to distribute just a my_module.py, uncomment
# this:
Expand All @@ -80,6 +82,8 @@
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=['numpy>=1.10.4', 'h5py>=2.5'],
setup_requires=['pkgconfig', 'six'],
zip_safe=False,

# List additional groups of dependencies here (e.g. development
# dependencies). You can install these using the following syntax,
Expand All @@ -106,10 +110,8 @@
# To provide executable scripts, use entry points in preference to the
# "scripts" keyword. Entry points provide cross-platform support and allow
# pip to create the appropriate form of executable for the target platform.
#entry_points={
# 'console_scripts': [
# 'h5tojson=h5tojson:h5tojson', 'jsontoh5=jsontoh5:jsontoh5',
# ],
#},
scripts=['h5tojson/h5tojson.py', 'jsontoh5/jsontoh5.py'],
entry_points={'console_scripts':
['h5tojson = h5json.h5tojson.h5tojson:main',
'jsontoh5 = h5json.jsontoh5.jsontoh5:main'
]},
)

0 comments on commit c761bae

Please sign in to comment.