Commit a69ad069 authored by eric pellegrini's avatar eric pellegrini
Browse files

added sphinx build command

parent f931bcca
import os
from setuptools import setup, find_packages
name = "hdfviewer"
# Read the package metadata first
pkginfo = {}
exec(open("src/hdfviewer/__pkginfo__.py","r").read(),{},pkginfo)
from setuptools import setup, find_packages
# Set up the sphinx documentation command
cmdclass = {}
command_options = {}
try:
from sphinx.setup_command import BuildDoc
except ImportError:
pass
else:
cmdclass = {'build_sphinx': BuildDoc}
command_options["build_sphinx"] = {}
command_options["build_sphinx"]["project"] = ("setup.py",name)
command_options["build_sphinx"]["version"] = ("setup.py",pkginfo["__version__"])
command_options["build_sphinx"]["release"] = ("setup.py",pkginfo["__release__"])
command_options["build_sphinx"]["source_dir"] = ('setup.py', 'docs')
# Add additional information to pkginfo
pkginfo["__classifiers__"] = ["Programming Language :: Python :: 3","License :: OSI Approved :: MIT License","Operating System :: OS Independent"]
......@@ -15,7 +31,7 @@ with open("README.md","r") as f:
packages = find_packages("src")
setup(name = "hdfviewer",
setup(name = name,
version = pkginfo["__version__"],
description = pkginfo["__description__"],
long_description = pkginfo["__long_description__"],
......@@ -30,5 +46,7 @@ setup(name = "hdfviewer",
packages = packages,
package_dir = {"" : "src"},
platforms = ['Unix','Windows'],
install_requires = ["numpy","matplotlib","h5py","jupyterlab","ipywidgets","ipympl"]
install_requires = ["numpy","matplotlib","h5py","jupyterlab","ipywidgets","ipympl"],
cmdclass = cmdclass,
command_options = command_options,
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment