Commit 2810d9e1 authored by eric pellegrini's avatar eric pellegrini
Browse files

the setup.py file uses only setuptools from now

parent 40bf3fc1
import os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
from setuptools import setup, find_packages
pkginfo = {}
exec(open("src/__pkginfo__.py","r").read(),{},pkginfo)
exec(open("src/hdfviewer/__pkginfo__.py","r").read(),{},pkginfo)
# Add additional information to pkginfo
pkginfo["__classifiers__"] = ["Programming Language :: Python :: 3","License :: OSI Approved :: MIT License","Operating System :: OS Independent"]
......@@ -16,23 +13,7 @@ pkginfo["__long_description_content_type__"] ="text/markdown"
with open("README.md","r") as f:
pkginfo["__long_description__"] = f.read()
def is_package(path):
return (os.path.isdir(path) and os.path.isfile(os.path.join(path, '__init__.py')))
def find_packages(path, base=None, exclude=None):
packages = []
for root,dirs,files in os.walk(path):
if "__init__.py" in files:
if base is not None:
root = root.replace(path,base)
package = root.replace(os.sep,".")
packages.append(package)
return packages
packages = find_packages(path="src",base="hdfviewer")
packages = find_packages("src")
setup(name = "hdfviewer",
version = pkginfo["__version__"],
......@@ -47,7 +28,7 @@ setup(name = "hdfviewer",
license = pkginfo["__license__"],
classifiers = pkginfo["__classifiers__"],
packages = packages,
package_dir = {"hdfviewer" : "src"},
package_dir = {"" : "src"},
platforms = ['Unix','Windows'],
install_requires = ["numpy","matplotlib","h5py","jupyterlab","ipywidgets","ipympl"]
)
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