Repository: ellisonbg/antipackage Branch: master Commit: 7b918e54313f Files: 6 Total size: 40.7 KB Directory structure: gitextract_nocukjap/ ├── .gitignore ├── LICENSE ├── README.md ├── antipackage.py ├── docs/ │ └── BasicUsage.ipynb └── setup.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .cache nosetests.xml coverage.xml # Translations *.mo *.pot # Django stuff: *.log # Sphinx documentation docs/_build/ # PyBuilder target/ .ipynb_checkpoints ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2014 Brian E. Granger Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ AntiPackage =========== Automagically import single file Python modules from GitHub. ## Installation The `antipackage` package can be installed from GitHub using `pip`: ``` pip install git+https://github.com/ellisonbg/antipackage.git#egg=antipackage ``` ## Usage Enable `antipackage` by simply importing it: ```python import antipackage ``` Once `antipackage` has been imported you can simply import modules from GitHub using the syntax: ```python from github.username.repo import module ``` When you do this, the import hook will automatically download and install single file Python modules into the location `~/.antipackage/github/username/repo/module.py`. If the module ever changes on GitHub it will be updated next time you import it. ## Absolute imports The `antipackage` package is written looking forward to the days when Python 2 is no longer supported. Because of this, the import hooks used in `antipackage` assume that relative imports are not used in the single file modules that are being imported. To enable this behavior for Python 2, add the following line at the top of your modules: ```python from __future__ import absolute_import ``` Like this: https://github.com/ellisonbg/misc/blob/master/vizarray.py#L26 ================================================ FILE: antipackage.py ================================================ # encoding: utf-8 """Automagically import single file Python modules from GitHub. To use, just import `antipackage`: import antipackage Then you can import single file Python modules from GitHub using: from github.username.repo import module Modules are downloaded and cached locally. They are automatically updated to the latest version anytime they change on GitHub. """ from __future__ import print_function import os import sys import hashlib import shutil # Imports for urllib are different in py2 vs. py3 try: from urllib import urlretrieve except ImportError: from urllib.request import urlretrieve class InstallError(Exception): pass class GitHubImporter(object): def __init__(self): self.base_dir = os.path.expanduser('~/.antipackage') if not os.path.exists(self.base_dir): os.makedirs(self.base_dir) sys.path.append(self.base_dir) def _parse_fullname(self, fullname): comps = fullname.split('.') top, username, repo, modname = None, None, None, None if len(comps)>=1: top = 'github' if len(comps)>=2: username = comps[1] if len(comps)>=3: repo = comps[2] if len(comps)>=4: modname = comps[3] return top, username, repo, modname def _install_init(self, path): ipath = os.path.join(path, '__init__.py') # print('Installing: ', ipath) self._touch(ipath) def _setup_package(self, path): if not os.path.exists(path): os.makedirs(path) self._install_init(path) def _update_if_changed(self, old, new): new_hash = '' with open(new, 'r') as f: new_hash = hashlib.md5(f.read()).hexdigest() old_hash = '' if os.path.isfile(old): with open(old, 'r') as f: old_hash = hashlib.md5(f.read()).hexdigest() if new_hash!=old_hash: shutil.copy(new, old) if old_hash: return 'updated' else: return 'installed' return 'noaction' def _touch(self, path): with open(path, 'a'): os.utime(path, None) def _install_module(self, fullname): top, username, repo, modname = self._parse_fullname(fullname) url = 'https://raw.githubusercontent.com/%s/%s/master/%s' % (username, repo, modname+'.py') print('Downloading: ', url) try: tmp_file, resp = urlretrieve(url) with open(tmp_file, 'r') as f: new_content = f.read() if new_content=='Not Found': raise InstallError('remote file does not exist') except IOError: raise InstallError('error downloading file') new = tmp_file old = self._install_path(fullname) updated = self._update_if_changed(old, new) if updated=='updated': print('Updating module: ', fullname) elif updated=='installed': print('Installing module: ', fullname) elif updated=='noaction': print('Using existing version: ', fullname) def _install_path(self, fullname): top, username, repo, modname = self._parse_fullname(fullname) return os.path.join(self.base_dir, top, username, repo, modname+'.py') def _make_package(self, fullname): top, username, repo, modname = self._parse_fullname(fullname) if repo is not None: repo_path = os.path.join(self.base_dir, top, username, repo) self._setup_package(repo_path) if username is not None: user_path = os.path.join(self.base_dir, top, username) self._setup_package(user_path) if top is not None: top_path = os.path.join(self.base_dir, top) self._setup_package(top_path) if modname is not None: try: self._install_module(fullname) except InstallError: if os.path.isfile(self._install_path(fullname)): print('Using existing version: ', fullname) else: print('Error installing/updating module: ', fullname) def find_module(self, fullname, path=None): # print('find_module', fullname, path) if fullname.startswith('github'): self._make_package(fullname) return None sys.meta_path = [GitHubImporter()] ================================================ FILE: docs/BasicUsage.ipynb ================================================ { "metadata": { "kernelspec": { "codemirror_mode": { "name": "ipython", "version": 2 }, "display_name": "IPython (Python 2)", "language": "python", "name": "python2" }, "name": "", "signature": "sha256:41dca07ce8844f3589b9124572f193a1afe275e373b1547620fe3b5c0fd74697" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "import antipackage" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "from github.ellisonbg.misc import vizarray" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "find_module github None\n", "find_module github.ellisonbg ['/Users/bgranger/.antipackage/github']\n", "find_module github.ellisonbg.misc ['/Users/bgranger/.antipackage/github/ellisonbg']\n", "find_module github.ellisonbg.misc.vizarray ['/Users/bgranger/.antipackage/github/ellisonbg/misc']\n", "Downloading: https://raw.githubusercontent.com/ellisonbg/misc/master/vizarray.py\n", "find_module httplib None\n", "find_module mimetools None\n", "find_module rfc822 None\n", "Using existing version: github.ellisonbg.misc.vizarray\n", "find_module github.ellisonbg.misc.ipythonblocks ['/Users/bgranger/.antipackage/github/ellisonbg/misc']\n", "Downloading: https://raw.githubusercontent.com/ellisonbg/misc/master/ipythonblocks.py\n", "Error installing/updating module: github.ellisonbg.misc.ipythonblocks\n", "find_module ipythonblocks None\n", "find_module ipythonblocks.ipythonblocks ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.copy ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.collections ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.json ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.numbers ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.os ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.sys ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.time ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.uuid ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.operator ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.functools ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module ipythonblocks.IPython ['/Users/bgranger/anaconda/lib/python2.7/site-packages/ipythonblocks']\n", "find_module github.ellisonbg.misc.numpy ['/Users/bgranger/.antipackage/github/ellisonbg/misc']\n", "Downloading: https://raw.githubusercontent.com/ellisonbg/misc/master/numpy.py\n", "Error installing/updating module: github.ellisonbg.misc.numpy\n", "find_module numpy None\n", "find_module numpy.__config__ ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.version ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy._import_tools ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.add_newdocs ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.lib ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.lib.info ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.type_check ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.core ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.core.info ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.multiarray ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.umath ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core._internal ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.compat ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.compat._inspect ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/compat']\n", "find_module numpy.compat.py3k ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/compat']\n", "find_module numpy.core.numerictypes ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.numeric ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core._dotblas ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.arrayprint ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.fromnumeric ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core._methods ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.defchararray ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.records ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.memmap ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.scalarmath ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.function_base ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.machar ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.getlimits ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.core.shape_base ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/core']\n", "find_module numpy.testing ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module unittest None\n", "find_module unittest.result ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.os ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.sys ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.traceback ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.StringIO ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.util ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.collections ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.functools ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.case ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.difflib ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module difflib None\n", "find_module unittest.pprint ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.re ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.types ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.warnings ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.suite ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.loader ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.fnmatch ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.main ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.runner ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.time ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.signals ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.signal ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module unittest.weakref ['/Users/bgranger/anaconda/lib/python2.7/unittest']\n", "find_module numpy.testing.decorators ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/testing']\n", "find_module numpy.testing.utils ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/testing']\n", "find_module numpy.testing.nosetester ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/testing']\n", "find_module numpy.lib.ufunclike ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.index_tricks ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.function_base ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.twodim_base ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.utils ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib._compiled_base ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.matrixlib ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.matrixlib.defmatrix ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/matrixlib']\n", "find_module numpy.lib.stride_tricks ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.nanfunctions ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.shape_base ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.scimath ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.polynomial ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.linalg ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.linalg.info ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/linalg']\n", "find_module numpy.linalg.linalg ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/linalg']\n", "find_module numpy.linalg.lapack_lite ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/linalg']\n", "find_module numpy.linalg._umath_linalg ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/linalg']\n", "find_module numpy.lib.arraysetops ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.npyio ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.format ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib._datasource ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib._iotools ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module future_builtins None\n", "find_module numpy.lib.financial ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.arrayterator ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.arraypad ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib._version ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.lib.numpy ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/lib']\n", "find_module numpy.fft ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.fft.info ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/fft']\n", "find_module mklfft None\n", "find_module numpy.fft.fftpack ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/fft']\n", "find_module numpy.fft.fftpack_lite ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/fft']\n", "find_module numpy.fft.helper ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/fft']\n", "find_module numpy.polynomial ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.polynomial.polynomial ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.polynomial.polyutils ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.polynomial._polybase ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.polynomial.chebyshev ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.polynomial.legendre ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.polynomial.hermite ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.polynomial.hermite_e ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.polynomial.laguerre ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/polynomial']\n", "find_module numpy.random ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.random.info ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/random']\n", "find_module numpy.random.mtrand ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/random']\n", "find_module numpy.random.numpy ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/random']\n", "find_module numpy.random.operator ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/random']\n", "find_module numpy.random.warnings ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/random']\n", "find_module numpy.random.threading ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/random']\n", "find_module numpy.ctypeslib ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.ma ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy']\n", "find_module numpy.ma.core ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/ma']\n", "find_module numpy.ma.extras ['/Users/bgranger/anaconda/lib/python2.7/site-packages/numpy/ma']\n", "find_module github.ellisonbg.misc.matplotlib ['/Users/bgranger/.antipackage/github/ellisonbg/misc']\n", "Downloading: https://raw.githubusercontent.com/ellisonbg/misc/master/matplotlib.py\n", "Error installing/updating module: github.ellisonbg.misc.matplotlib\n", "find_module matplotlib None\n", "find_module six None\n", "find_module dateutil None\n", "find_module pyparsing None\n", "find_module urllib2 None\n", "find_module bisect None\n", "find_module _bisect None\n", "find_module distutils.sysconfig ['/Users/bgranger/anaconda/lib/python2.7/distutils']\n", "find_module distutils.os ['/Users/bgranger/anaconda/lib/python2.7/distutils']\n", "find_module distutils.sys ['/Users/bgranger/anaconda/lib/python2.7/distutils']\n", "find_module distutils.distutils ['/Users/bgranger/anaconda/lib/python2.7/distutils']\n", "find_module distutils.errors ['/Users/bgranger/anaconda/lib/python2.7/distutils']\n", "find_module matplotlib.cbook ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module six.moves []\n", "find_module gzip None\n", "find_module matplotlib.compat ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.compat.subprocess ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/compat']\n", "find_module matplotlib.rcsetup ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.fontconfig_pattern ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.colors ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.pyplot ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.colorbar ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.artist ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.docstring ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.transforms ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib._path ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.path ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.collections ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.cm ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib._cm ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.backend_bases ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.widgets ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.mlab ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module csv None\n", "find_module _csv None\n", "find_module matplotlib.patches ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.bezier ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.lines ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.markers ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib._pylab_helpers ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.tight_bbox ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.textpath ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.font_manager ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.afm ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib._mathtext_data ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.ft2font ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.mathtext ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module unicodedata None\n", "find_module matplotlib._png ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.dviread ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module PIL None\n", "find_module PIL.Image ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.__future__ ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.PIL ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.warnings ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module FixTk None\n", "find_module PIL._imaging ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.builtins ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module builtins None\n", "find_module PIL.__builtin__ ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.ImageMode ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL._binary ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL._util ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.os ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.sys ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.collections ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.numbers ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module PIL.cffi ['/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL']\n", "find_module cffi None\n", "find_module cffi.api ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module cffi.sys ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module cffi.types ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module cffi.lock ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module cffi.thread ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module cffi.ffiplatform ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module cffi.os ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module cffi.cStringIO ['/Users/bgranger/anaconda/lib/python2.7/site-packages/cffi']\n", "find_module matplotlib.contour ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib._cntr ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.ticker ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.text ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.texmanager ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.blocking_input ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.gridspec ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.style ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.style.core ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/style']\n", "find_module matplotlib.figure ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib._image ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.image ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.axes ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.axes._subplots ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/axes']\n", "find_module matplotlib.axes._axes ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/axes']\n", "find_module matplotlib.dates ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module dateutil.rrule ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.itertools ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.datetime ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.calendar ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil._thread ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module _thread None\n", "find_module dateutil.thread ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.sys ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.six ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.relativedelta ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.parser ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.__future__ ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.string ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.time ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.os ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.collections ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.io ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.tz ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.struct ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.dateutil ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.tzwin ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module dateutil.winreg ['/Users/bgranger/anaconda/lib/python2.7/site-packages/dateutil']\n", "find_module winreg None\n", "find_module matplotlib.units ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.legend ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.offsetbox ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.container ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.legend_handler ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.quiver ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.stackplot ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.streamplot ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.table ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.tri ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.tri.triangulation ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib._tri ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib._qhull ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.tri.tricontour ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib.tri.tritools ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib.tri.trifinder ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib.tri.triinterpolate ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib.tri.trirefine ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib.tri.tripcolor ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib.tri.triplot ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/tri']\n", "find_module matplotlib.axes._base ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/axes']\n", "find_module matplotlib.axis ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.scale ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.spines ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.projections ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.projections.geo ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/projections']\n", "find_module matplotlib.projections.polar ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/projections']\n", "find_module matplotlib.backends ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib']\n", "find_module matplotlib.backends.backend_macosx ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/backends']\n", "find_module matplotlib.backends._macosx ['/Users/bgranger/anaconda/lib/python2.7/site-packages/matplotlib/backends']\n" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "import numpy as np" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "import sys" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "sys.path" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "['',\n", " '/Users/bgranger/github/ellisonbg/ggplot',\n", " '/Users/bgranger/github/ellisonbg/cytoolz',\n", " '/Users/bgranger/github/ellisonbg/mpld3',\n", " '/Users/bgranger/github/ellisonbg/multipledispatch',\n", " '/Users/bgranger/github/ellisonbg/python-api',\n", " '/Users/bgranger/github/ellisonbg/seaborn',\n", " '/Users/bgranger/github/ellisonbg/toolz',\n", " '/Users/bgranger/github/ellisonbg/vincent',\n", " '/Users/bgranger/github/ellisonbg/zpyrpc',\n", " '/Users/bgranger/github/ipython/nbviewer',\n", " '/Users/bgranger/github/sympy/sympy',\n", " '/Users/bgranger/github/ellisonbg/folium',\n", " '/Users/bgranger/github/ellisonbg/leaftletwidget',\n", " '/Users/bgranger/github/jupyter/jupyterhub',\n", " '/Users/bgranger/github/jupyter/nbgrader',\n", " '/Users/bgranger/github/ipython/ipython',\n", " '/Users/bgranger/github/jupyter/terminado',\n", " '/Users/bgranger/github/ellisonbg/qgrid',\n", " '/Users/bgranger/github/ellisonbg/antipackage',\n", " '/Users/bgranger/anaconda/lib/python27.zip',\n", " '/Users/bgranger/anaconda/lib/python2.7',\n", " '/Users/bgranger/anaconda/lib/python2.7/plat-darwin',\n", " '/Users/bgranger/anaconda/lib/python2.7/plat-mac',\n", " '/Users/bgranger/anaconda/lib/python2.7/plat-mac/lib-scriptpackages',\n", " '/Users/bgranger/anaconda/lib/python2.7/lib-tk',\n", " '/Users/bgranger/anaconda/lib/python2.7/lib-old',\n", " '/Users/bgranger/anaconda/lib/python2.7/lib-dynload',\n", " '/Users/bgranger/anaconda/lib/python2.7/site-packages',\n", " '/Users/bgranger/anaconda/lib/python2.7/site-packages/PIL',\n", " '/Users/bgranger/anaconda/lib/python2.7/site-packages/Sphinx-1.2.3-py2.7.egg',\n", " '/Users/bgranger/github/ellisonbg/bokeh',\n", " '/Users/bgranger/anaconda/lib/python2.7/site-packages/newrelic-2.18.1.15',\n", " '/Users/bgranger/anaconda/lib/python2.7/site-packages/runipy-0.1.1-py2.7.egg',\n", " '/Users/bgranger/anaconda/lib/python2.7/site-packages/setuptools-5.8-py2.7.egg',\n", " '/Users/bgranger/github/ipython/ipython/IPython/extensions',\n", " '/Users/bgranger/.ipython',\n", " '/Users/bgranger/.antipackage']" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] } ================================================ FILE: setup.py ================================================ from distutils.core import setup setup(name='antipackage', version='1.0', author="Brian E. Granger", author_email="ellisonbg@gmail.com", license="MIT License", url="https://github.com/ellisonbg/antipackage", py_modules=['antipackage'], )