diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..f9bd1455 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include requirements.txt diff --git a/docs/auto_examples/analyze_codeobj.pickle b/docs/auto_examples/analyze_codeobj.pickle index 7e7a6fee..6a940342 100644 Binary files a/docs/auto_examples/analyze_codeobj.pickle and b/docs/auto_examples/analyze_codeobj.pickle differ diff --git a/docs/auto_examples/save_image_codeobj.pickle b/docs/auto_examples/save_image_codeobj.pickle index 13fe4082..131593ab 100644 Binary files a/docs/auto_examples/save_image_codeobj.pickle and b/docs/auto_examples/save_image_codeobj.pickle differ diff --git a/docs/auto_examples/save_movie_codeobj.pickle b/docs/auto_examples/save_movie_codeobj.pickle index 0542dfea..4c33795c 100644 Binary files a/docs/auto_examples/save_movie_codeobj.pickle and b/docs/auto_examples/save_movie_codeobj.pickle differ diff --git a/docs/conf.py b/docs/conf.py index 5b8d166c..d22bb8ef 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -68,7 +68,7 @@ # The short X.Y version. version = u'0.6' # The full version, including alpha/beta/rc tags. -release = u'0.6.0' +release = u'0.6.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/requirements.txt b/requirements.txt index f5a862d6..ee88d43e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,8 +5,8 @@ seaborn>=0.8.1 matplotlib>=1.5.1 scipy>=1.0.0 numpy>=1.10.4 -https://api.github.com/repos/lmcinnes/umap/tarball/5f9488a9540d1e0ac149e2dd42ebf03c39706110#egg=umap_learn future requests deepdish six +# also requires umap-learn. However, due to a recent bug fix that has not been released on PyPI yet, umap-learn is installed from GitHub in setup.py \ No newline at end of file diff --git a/setup.py b/setup.py index fc0b8664..075d2ae8 100644 --- a/setup.py +++ b/setup.py @@ -1,36 +1,34 @@ # -*- coding: utf-8 -*- import os +import subprocess +import sys from setuptools import setup, find_packages +from setuptools.command.install import install os.environ["MPLCONFIGDIR"] = "." -def parse_dependencies(requirements_path, vcs_id, egg_id): - requirements = [] - with open(requirements_path, 'r') as f: - reqs = f.read().splitlines() +class PostInstall(install): + github_pkg = 'https://api.github.com/repos/lmcinnes/umap/tarball/5f9488a9540d1e0ac149e2dd42ebf03c39706110#egg=umap_learn' - for req in reqs: - if req.startswith(vcs_id) and egg_id in req: - package_name = req[req.find(egg_id) + len(egg_id):] - requirements.append(package_name + ' @ ' + req.rstrip(egg_id + package_name)) - else: - requirements.append(req) - - return requirements + def run(self): + install.run(self) + output = subprocess.run([sys.executable, '-m', 'pip', 'install', self.github_pkg], + stdout=subprocess.PIPE) + print(output.stdout.decode('utf-8')) NAME = 'hypertools' -VERSION = '0.6.0' +VERSION = '0.6.2' AUTHOR = 'Contextual Dynamics Lab' AUTHOR_EMAIL = 'contextualdynamics@gmail.com' URL = 'https://github.com/ContextLab/hypertools' DOWNLOAD_URL = URL LICENSE = 'MIT' -REQUIRES_PYTHON = '>=3' +REQUIRES_PYTHON = '>=3.5' PACKAGES = find_packages(exclude=('images', 'examples', 'tests')) -REQUIREMENTS = parse_dependencies('requirements.txt', 'https://api.github.com', '#egg=') - +with open('requirements.txt', 'r') as f: + REQUIREMENTS = f.read().splitlines() DESCRIPTION = 'A python package for visualizing and manipulating high-dimensional data' LONG_DESCRIPTION = """\ @@ -57,7 +55,11 @@ def parse_dependencies(requirements_path, vcs_id, egg_id): 'Topic :: Multimedia :: Graphics', 'Operating System :: POSIX', 'Operating System :: Unix', - 'Operating System :: MacOS'] + 'Operating System :: MacOS' +] +CMDCLASS = { + 'install': PostInstall +} setup( @@ -74,4 +76,5 @@ def parse_dependencies(requirements_path, vcs_id, egg_id): packages=PACKAGES, install_requires=REQUIREMENTS, classifiers=CLASSIFIERS, + cmdclass=CMDCLASS, )