├── .bumpversion.cfg ├── .circleci └── config.yml ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .gitmodules ├── CONTRIBUTING.md ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.md ├── docs ├── Makefile ├── conf.py ├── index.rst ├── overview.rst └── releases.rst ├── ethpm └── __init__.py ├── pytest.ini ├── setup.py └── tox.ini /.bumpversion.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.1.4-alpha.19 3 | commit = True 4 | tag = True 5 | parse = (?P\d+)\.(?P\d+)\.(?P\d+)(-(?P[^.]*)\.(?P\d+))? 6 | serialize = 7 | {major}.{minor}.{patch}-{stage}.{devnum} 8 | {major}.{minor}.{patch} 9 | 10 | [bumpversion:part:stage] 11 | optional_value = stable 12 | first_value = stable 13 | values = 14 | alpha 15 | beta 16 | stable 17 | 18 | [bumpversion:part:devnum] 19 | 20 | [bumpversion:file:setup.py] 21 | search = version='{current_version}', 22 | replace = version='{new_version}', 23 | 24 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.0 2 | 3 | # heavily inspired by: 4 | # https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml 5 | 6 | common: &common 7 | working_directory: ~/repo 8 | environment: 9 | SOLC_VERSION: v0.4.24 10 | steps: 11 | - checkout 12 | - run: 13 | name: install submodules 14 | command: git submodule update --init 15 | - run: 16 | name: install ipfs 17 | command: 18 | wget https://dist.ipfs.io/go-ipfs/v0.4.19/go-ipfs_v0.4.19_linux-amd64.tar.gz && 19 | tar xvfz go-ipfs_v0.4.19_linux-amd64.tar.gz && 20 | sudo cp go-ipfs/ipfs /usr/local/bin && 21 | ipfs init 22 | - run: 23 | name: start ipfs node in background 24 | command: ipfs daemon 25 | background: true 26 | - run: 27 | name: merge pull request base 28 | command: | 29 | if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then 30 | PR_INFO_URL=https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER 31 | PR_BASE_BRANCH=$(curl -L "$PR_INFO_URL" | python -c 'import json, sys; obj = json.load(sys.stdin); sys.stdout.write(obj["base"]["ref"])') 32 | git fetch origin +"$PR_BASE_BRANCH":circleci/pr-base 33 | # We need these config values or git complains when creating the 34 | # merge commit 35 | git config --global user.name "Circle CI" 36 | git config --global user.email "circleci@example.com" 37 | git merge --no-edit circleci/pr-base 38 | fi 39 | - restore_cache: 40 | keys: 41 | - cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} 42 | - run: 43 | name: install dependencies 44 | command: pip install --user tox 45 | - run: 46 | name: install solc 47 | command: | 48 | if [[ -n "$SOLC_VERSION" ]]; then 49 | sudo python3 -m pip install -U "py-solc>=1.2.0" 50 | sudo python3 -m solc.install $SOLC_VERSION 51 | echo 'export SOLC_BINARY=/root/.py-solc/solc-$SOLC_VERSION/bin/solc' >> $BASH_ENV 52 | echo 'export LD_LIBRARY_PATH=/root/.py-solc/solc-$SOLC_VERSION/bin' >> $BASH_ENV 53 | source $BASH_ENV 54 | sudo chmod -R 777 /root 55 | fi 56 | - run: 57 | name: run tox 58 | command: ~/.local/bin/tox -- --integration 59 | - save_cache: 60 | paths: 61 | - .tox 62 | - ~/.cache/pip 63 | - ~/.local 64 | - ./eggs 65 | key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} 66 | 67 | jobs: 68 | doctest: 69 | <<: *common 70 | docker: 71 | - image: circleci/python:3.6 72 | environment: 73 | TOXENV: doctest 74 | py36: 75 | <<: *common 76 | docker: 77 | - image: circleci/python:3.6 78 | environment: 79 | TOXENV: py36 80 | lint: 81 | <<: *common 82 | docker: 83 | - image: circleci/python:3.6 84 | environment: 85 | TOXENV: lint 86 | 87 | workflows: 88 | version: 2 89 | test: 90 | jobs: 91 | - doctest 92 | - py36 93 | - lint 94 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * Version: x.x.x 2 | * Python: 2.7/3.4/3.5 3 | * OS: osx/linux/win 4 | 5 | 6 | ### What was wrong? 7 | 8 | Please include any of the following that are applicable: 9 | 10 | * The code which produced the error 11 | * The full output of the error 12 | * What type of node you were connecting to. 13 | 14 | 15 | ### How can it be fixed? 16 | 17 | Fill this section in if you know how this could or should be fixed. 18 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### What was wrong? 2 | 3 | 4 | 5 | ### How was it fixed? 6 | 7 | 8 | 9 | #### Cute Animal Picture 10 | 11 | ![Cute animal picture]() 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | 3 | # C extensions 4 | *.so 5 | 6 | # Packages 7 | *.egg 8 | *.egg-info 9 | .eggs/ 10 | dist 11 | build 12 | eggs 13 | parts 14 | bin 15 | var 16 | sdist 17 | develop-eggs 18 | .installed.cfg 19 | lib 20 | lib64 21 | venv* 22 | .DS_Store 23 | 24 | # Installer logs 25 | pip-log.txt 26 | .pypirc 27 | 28 | # Unit test / coverage reports 29 | .coverage 30 | .tox 31 | nosetests.xml 32 | 33 | # Translations 34 | *.mo 35 | 36 | # Mr Developer 37 | .mr.developer.cfg 38 | .project 39 | .pydevproject 40 | 41 | # Complexity 42 | output/*.html 43 | output/*/index.html 44 | 45 | # Sphinx 46 | docs/_build 47 | docs/_static 48 | docs/_templates 49 | docs/modules.rst 50 | docs/web3.rst 51 | docs/web3.providers.rst 52 | docs/web3.utils.rst 53 | 54 | # Blockchain 55 | chains 56 | 57 | # Hypothese Property base testing 58 | .hypothesis 59 | 60 | # tox/pytest cache 61 | .cache 62 | .mypy_cache 63 | .pytest_cache/ 64 | 65 | # Test output logs 66 | logs 67 | ### JetBrains template 68 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 69 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 70 | 71 | # User-specific stuff: 72 | .idea/workspace.xml 73 | .idea/tasks.xml 74 | .idea/dictionaries 75 | .idea/vcs.xml 76 | .idea/jsLibraryMappings.xml 77 | .vscode/ 78 | 79 | # Sensitive or high-churn files: 80 | .idea/dataSources.ids 81 | .idea/dataSources.xml 82 | .idea/dataSources.local.xml 83 | .idea/sqlDataSources.xml 84 | .idea/dynamic.xml 85 | .idea/uiDesigner.xml 86 | 87 | # Gradle: 88 | .idea/gradle.xml 89 | .idea/libraries 90 | 91 | # Mongo Explorer plugin: 92 | .idea/mongoSettings.xml 93 | 94 | # VIM temp files 95 | *.swp 96 | 97 | ## File-based project format: 98 | *.iws 99 | 100 | ## Plugin-specific files: 101 | 102 | # IntelliJ 103 | /out/ 104 | 105 | # mpeltonen/sbt-idea plugin 106 | .idea_modules/ 107 | 108 | # JIRA plugin 109 | atlassian-ide-plugin.xml 110 | 111 | # Crashlytics plugin (for Android Studio and IntelliJ) 112 | com_crashlytics_export_strings.xml 113 | crashlytics.properties 114 | crashlytics-build.properties 115 | fabric.properties 116 | 117 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ethpm-spec"] 2 | path = ethpm-spec 3 | url = https://github.com/ethpm/ethpm-spec 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Development 2 | 3 | To start development you should begin by cloning the repo. 4 | 5 | ```bash 6 | $ git clone git@github.com/pipermerriam/web3.py.git 7 | ``` 8 | 9 | 10 | # Cute Animal Pictures 11 | 12 | All pull requests need to have a cute animal picture. This is a very important 13 | part of the development process. 14 | 15 | 16 | # Pull Requests 17 | 18 | In general, pull requests are welcome. Please try to adhere to the following. 19 | 20 | - code should conform to PEP8 and as well as the linting done by `flake8 web3/ tests/` 21 | - include tests. 22 | - include any relevant documentation updates. 23 | 24 | It's a good idea to make pull requests early on. A pull request represents the 25 | start of a discussion, and doesn't necessarily need to be the final, finished 26 | submission. 27 | 28 | GitHub's documentation for working on pull requests is [available here][pull-requests]. 29 | 30 | Always run the tests before submitting pull requests, and ideally run `tox` in 31 | order to check that your modifications don't break anything. 32 | 33 | Once you've made a pull request take a look at the travis build status in the 34 | GitHub interface and make sure the tests are runnning as you'd expect. 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Piper Merriam 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include VERSION 3 | include README.md 4 | include requirements.txt 5 | 6 | recursive-exclude * __pycache__ 7 | recursive-exclude * *.py[co] 8 | 9 | recursive-include ethpm/assets/ * 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean-pyc clean-build docs 2 | 3 | help: 4 | @echo "clean-build - remove build artifacts" 5 | @echo "clean-pyc - remove Python file artifacts" 6 | @echo "lint - check style with flake8" 7 | @echo "test - run tests quickly with the default Python" 8 | @echo "testall - run tests on every Python version with tox" 9 | @echo "release - package and upload a release" 10 | @echo "dist - package" 11 | 12 | clean: clean-build clean-pyc 13 | 14 | clean-build: 15 | rm -fr build/ 16 | rm -fr dist/ 17 | rm -fr *.egg-info 18 | 19 | clean-pyc: 20 | find . -name '*.pyc' -exec rm -f {} + 21 | find . -name '*.pyo' -exec rm -f {} + 22 | find . -name '*~' -exec rm -f {} + 23 | 24 | lint: 25 | flake8 ethpm 26 | 27 | test: 28 | py.test tests 29 | 30 | test-all: 31 | tox 32 | 33 | build-docs: 34 | rm -f docs/ethpm.rst 35 | rm -f docs/modules.rst 36 | sphinx-apidoc -o docs/ ethpm 37 | $(MAKE) -C docs clean 38 | $(MAKE) -C docs html 39 | $(MAKE) -C docs doctest 40 | 41 | docs: build-docs 42 | open docs/_build/html/index.html 43 | 44 | linux-docs: build-docs 45 | xdg-open docs/_build/html/index.html 46 | 47 | release: clean 48 | CURRENT_SIGN_SETTING=$(git config commit.gpgSign) 49 | git config commit.gpgSign true 50 | bumpversion $(bump) 51 | git push upstream && git push upstream --tags 52 | python setup.py sdist bdist_wheel 53 | twine upload dist/* 54 | git config commit.gpgSign "$(CURRENT_SIGN_SETTING)" 55 | 56 | dist: clean 57 | python setup.py sdist bdist_wheel 58 | ls -l dist 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Py-EthPM 2 | 3 | [![Join the chat at https://gitter.im/ethpm/lobby](https://badges.gitter.im/ethpm/lobby.py.svg)](https://gitter.im/ethpm/lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | 6 | WARNING! 7 | 8 | `py-ethpm` is deprecated, and no longer maintained. 9 | Please use the [ethpm module](https://web3py.readthedocs.io/en/stable/ethpm.html) in [web3.py](https://github.com/ethereum/web3.py/) instead. 10 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = Py-EthPM 8 | PAPER = 9 | BUILDDIR = _build 10 | 11 | # User-friendly check for sphinx-build 12 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 13 | $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/") 14 | endif 15 | 16 | # Internal variables. 17 | PAPEROPT_a4 = -D latex_paper_size=a4 18 | PAPEROPT_letter = -D latex_paper_size=letter 19 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 20 | # the i18n builder cannot share the environment and doctrees with the others 21 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 22 | 23 | # Put it first so that "make" without argument is like "make help". 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 28 | 29 | .PHONY: help clean html doctest 30 | 31 | # Catch-all target: route all unknown targets to Sphinx using the new 32 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 33 | %: Makefile 34 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 35 | 36 | clean: 37 | rm -rf $(BUILDDIR)/* 38 | 39 | html: 40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 41 | @echo 42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 43 | 44 | doctest: 45 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 46 | @echo "Testing of doctests in the sources finished, look at the " \ 47 | "results in $(BUILDDIR)/doctest/output.txt." 48 | 49 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Configuration file for the Sphinx documentation builder. 4 | # 5 | # This file does only contain a selection of the most common options. For a 6 | # full list see the documentation: 7 | # http://www.sphinx-doc.org/en/master/config 8 | 9 | # -- Path setup -------------------------------------------------------------- 10 | 11 | # If extensions (or modules to document with autodoc) are in another directory, 12 | # add these directories to sys.path here. If the directory is relative to the 13 | # documentation root, use os.path.abspath to make it absolute, like shown here. 14 | # 15 | # import os 16 | # import sys 17 | # sys.path.insert(0, os.path.abspath('.')) 18 | 19 | 20 | # -- Project information ----------------------------------------------------- 21 | 22 | project = 'Py-EthPM' 23 | copyright = '2018, Piper Merriam, et al.' 24 | author = 'Piper Merriam, et al.' 25 | 26 | # The short X.Y version 27 | version = '' 28 | # The full version, including alpha/beta/rc tags 29 | release = '' 30 | 31 | 32 | # -- General configuration --------------------------------------------------- 33 | 34 | # If your documentation needs a minimal Sphinx version, state it here. 35 | # 36 | # needs_sphinx = '1.0' 37 | 38 | # Add any Sphinx extension module names here, as strings. They can be 39 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 40 | # ones. 41 | extensions = [ 42 | 'sphinx.ext.doctest', 43 | 'sphinx.ext.autodoc', 44 | ] 45 | 46 | # Add any paths that contain templates here, relative to this directory. 47 | templates_path = ['_templates'] 48 | 49 | # The suffix(es) of source filenames. 50 | # You can specify multiple suffix as a list of string: 51 | # 52 | # source_suffix = ['.rst', '.md'] 53 | source_suffix = '.rst' 54 | 55 | # The master toctree document. 56 | master_doc = 'index' 57 | 58 | # The language for content autogenerated by Sphinx. Refer to documentation 59 | # for a list of supported languages. 60 | # 61 | # This is also used if you do content translation via gettext catalogs. 62 | # Usually you set "language" from the command line for these cases. 63 | language = None 64 | 65 | # List of patterns, relative to source directory, that match files and 66 | # directories to ignore when looking for source files. 67 | # This pattern also affects html_static_path and html_extra_path . 68 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 69 | 70 | # The name of the Pygments (syntax highlighting) style to use. 71 | pygments_style = 'sphinx' 72 | 73 | 74 | # -- Options for HTML output ------------------------------------------------- 75 | 76 | # The theme to use for HTML and HTML Help pages. See the documentation for 77 | # a list of builtin themes. 78 | # 79 | html_theme = 'sphinx_rtd_theme' 80 | 81 | # Theme options are theme-specific and customize the look and feel of a theme 82 | # further. For a list of options available for each theme, see the 83 | # documentation. 84 | # 85 | # html_theme_options = {} 86 | 87 | # Add any paths that contain custom static files (such as style sheets) here, 88 | # relative to this directory. They are copied after the builtin static files, 89 | # so a file named "default.css" will overwrite the builtin "default.css". 90 | html_static_path = ['_static'] 91 | 92 | # Custom sidebar templates, must be a dictionary that maps document names 93 | # to template names. 94 | # 95 | # The default sidebars (for documents that don't match any pattern) are 96 | # defined by theme itself. Builtin themes are using these templates by 97 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 98 | # 'searchbox.html']``. 99 | # 100 | # html_sidebars = {} 101 | 102 | 103 | # -- Options for HTMLHelp output --------------------------------------------- 104 | 105 | # Output file base name for HTML help builder. 106 | htmlhelp_basename = 'Py-EthPMdoc' 107 | 108 | 109 | # -- Options for LaTeX output ------------------------------------------------ 110 | 111 | latex_elements = { 112 | # The paper size ('letterpaper' or 'a4paper'). 113 | # 114 | # 'papersize': 'letterpaper', 115 | 116 | # The font size ('10pt', '11pt' or '12pt'). 117 | # 118 | # 'pointsize': '10pt', 119 | 120 | # Additional stuff for the LaTeX preamble. 121 | # 122 | # 'preamble': '', 123 | 124 | # Latex figure (float) alignment 125 | # 126 | # 'figure_align': 'htbp', 127 | } 128 | 129 | # Grouping the document tree into LaTeX files. List of tuples 130 | # (source start file, target name, title, 131 | # author, documentclass [howto, manual, or own class]). 132 | latex_documents = [ 133 | (master_doc, 'Py-EthPM.tex', 'Py-EthPM Documentation', 134 | 'Piper Merriam, et al.', 'manual'), 135 | ] 136 | 137 | 138 | # -- Options for manual page output ------------------------------------------ 139 | 140 | # One entry per manual page. List of tuples 141 | # (source start file, name, description, authors, manual section). 142 | man_pages = [ 143 | (master_doc, 'py-ethpm', 'Py-EthPM Documentation', 144 | [author], 1) 145 | ] 146 | 147 | 148 | # -- Options for Texinfo output ---------------------------------------------- 149 | 150 | # Grouping the document tree into Texinfo files. List of tuples 151 | # (source start file, target name, title, author, 152 | # dir menu entry, description, category) 153 | texinfo_documents = [ 154 | (master_doc, 'Py-EthPM', 'Py-EthPM Documentation', 155 | author, 'Py-EthPM', 'One line description of project.', 156 | 'Miscellaneous'), 157 | ] 158 | 159 | # -- Doctest configuration ---------------------------------------- 160 | 161 | import doctest 162 | 163 | doctest_default_flags = (0 164 | | doctest.DONT_ACCEPT_TRUE_FOR_1 165 | | doctest.ELLIPSIS 166 | | doctest.IGNORE_EXCEPTION_DETAIL 167 | | doctest.NORMALIZE_WHITESPACE 168 | ) 169 | 170 | # Setup for autoclassed doctests 171 | doctest_global_setup = """ 172 | from ethpm import Package, V2_PACKAGES_DIR 173 | from web3 import Web3 174 | 175 | owned_manifest_path = V2_PACKAGES_DIR / 'owned' / '1.0.0.json' 176 | w3 = Web3(Web3.EthereumTesterProvider()) 177 | OwnedPackage = Package.from_file(owned_manifest_path, w3) 178 | """ 179 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. Py-EthPM documentation master file, created by 2 | sphinx-quickstart on Mon May 14 11:07:19 2018. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to Py-EthPM's documentation! 7 | ==================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | :caption: Contents: 12 | 13 | overview.rst 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | -------------------------------------------------------------------------------- /docs/overview.rst: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | .. warning:: 5 | This library has been deprecated in favor of the `ethpm` module in `web3.py `__. 6 | 7 | This is a Python implementation of the `Ethereum Smart Contract 8 | Packaging 9 | Specification `__, 10 | driven by discussions in `ERC 11 | 190 `__ and `ERC 12 | 1123 `__. 13 | -------------------------------------------------------------------------------- /docs/releases.rst: -------------------------------------------------------------------------------- 1 | Release Notes 2 | ============= 3 | 4 | v0.1.4-alpha.19 5 | --------------- 6 | 7 | Released May 24nd, 2019 8 | 9 | - Relax web3 dependency to 5.0.0b1 10 | 11 | v0.1.4-alpha.18 12 | --------------- 13 | 14 | Released May 23nd, 2019 15 | 16 | - Bugfix in LinkableContract class 17 | - `#159 `_ 18 | 19 | v0.1.4-alpha.17 20 | --------------- 21 | 22 | Released May 22nd, 2019 23 | 24 | - Update ipfshttplib dependency & add tests 25 | - `#157 `_ 26 | 27 | v0.1.4-alpha.16 28 | --------------- 29 | 30 | Released May 17th, 2019 31 | 32 | - Update to use new IPFS library 33 | - `#158 `_ 34 | 35 | - Update mypy dependency 36 | - `#153 `_ 37 | 38 | v0.1.4-alpha.15 39 | --------------- 40 | 41 | Released April 25th, 2019 42 | 43 | - Write is_supported_content_addressed_uri util. 44 | - `#152 `_ 45 | 46 | v0.1.4-alpha.14 47 | --------------- 48 | 49 | Released April 10th, 2019 50 | 51 | - Bugfix 52 | 53 | - Update registry backend to work with ``web3.pm`` 54 | - `#151 `_ 55 | 56 | v0.1.4-alpha.13 57 | --------------- 58 | 59 | Released March 22nd, 2019 60 | 61 | - Bugfix 62 | 63 | - Remove auto infura endpoint 64 | - `#149 `_ 65 | 66 | v0.1.4-alpha.12 67 | --------------- 68 | 69 | Released February 12th, 2019 70 | 71 | - Breaking Changes 72 | 73 | - Change ``Package.switch_w3`` to ``Package.update_w3`` 74 | - `#146 `_ 75 | 76 | v0.1.4-alpha.11 77 | --------------- 78 | 79 | Released February 12th, 2019 80 | 81 | - Breaking Changes 82 | 83 | - Remove ``py-solc`` dependency and solidity compilation 84 | - `#143 `_ 85 | - Update vyper reference registry assets 86 | - `#145 `_ 87 | 88 | - Features 89 | 90 | - Support contract aliasing for deployments 91 | - `#144 `_ 92 | 93 | 94 | v0.1.4-alpha.10 95 | --------------- 96 | 97 | Released January 17th, 2019 98 | 99 | - Breaking Changes 100 | 101 | - ``Package.set_default_w3()`` returns new ``Package`` 102 | instance. 103 | - `#139 `_ 104 | - ``Web3`` dependency updated to ``v5.0.0a3``. 105 | - `#137 `_ 106 | 107 | - Bugfixes 108 | 109 | - ``Builder`` bugfix to account for contract factories. 110 | - `#138 `_ 111 | - Add ``global_doctest_setup`` for autodoc to use. 112 | -------------------------------------------------------------------------------- /ethpm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpm/py-ethpm/1689fd2f0cc47c1b521f1eb30901b0fe07c43502/ethpm/__init__.py -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | addopts= -v --showlocals --color=yes 3 | python_paths= . 4 | 5 | [pytest-watch] 6 | runner= py.test --failed-first --maxfail=1 7 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | import os 4 | 5 | from setuptools import ( 6 | setup, 7 | find_packages, 8 | ) 9 | 10 | 11 | DIR = os.path.dirname(os.path.abspath(__file__)) 12 | 13 | 14 | readme = open(os.path.join(DIR, 'README.md')).read() 15 | 16 | extras_require={ 17 | 'test': [ 18 | 'pytest>=3.2.1,<4', 19 | 'pytest-ethereum>=0.1.3a.7,<1', 20 | 'tox>=1.8.0,<2', 21 | ], 22 | 'lint': [ 23 | 'black>=19.3b0,<20', 24 | 'isort>=4.3.17,<5', 25 | 'flake8>=3.7.0,<4', 26 | 'mypy<0.800', 27 | ], 28 | 'doc': [ 29 | 'Sphinx>=1.5.5,<2', 30 | 'sphinx_rtd_theme>=0.1.9,<2', 31 | ], 32 | 'dev': [ 33 | 'bumpversion>=0.5.3,<1', 34 | 'ipython>=7.2.0,<8', 35 | 'pytest-watch>=4.1.0,<5', 36 | 'twine', 37 | 'wheel', 38 | ], 39 | } 40 | 41 | extras_require['dev'] = ( 42 | extras_require['dev'] 43 | + extras_require['test'] 44 | + extras_require['lint'] 45 | + extras_require['doc'] 46 | ) 47 | 48 | setup( 49 | name='ethpm', 50 | # *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility. 51 | version='0.1.4-alpha.19', 52 | description="""Python abstraction for ERC190 packages.""", 53 | long_description_markdown_filename='README.md', 54 | author='Piper Merriam', 55 | author_email='pipermerriam@gmail.com', 56 | url='https://github.com/ethpm/py-ethpm', 57 | include_package_data=True, 58 | install_requires=[ 59 | 'eth-utils>=1.6.0,<2', 60 | 'ipfshttpclient>=0.4.12,<1', 61 | 'jsonschema>=2.6.0,<3', 62 | 'protobuf>=3.0.0,<4', 63 | 'rlp>=1.0.1,<2', 64 | 'web3[tester]>=5.0.0b1,<6', 65 | ], 66 | setup_requires=['setuptools-markdown'], 67 | python_requires='>=3.6, <4', 68 | extras_require=extras_require, 69 | py_modules=['ethpm'], 70 | license='MIT', 71 | zip_safe=False, 72 | keywords='ethereum', 73 | packages=find_packages(exclude=['tests', 'tests.*']), 74 | classifiers=[ 75 | 'Development Status :: 3 - Alpha', 76 | 'Intended Audience :: Developers', 77 | 'License :: OSI Approved :: MIT License', 78 | 'Natural Language :: English', 79 | 'Programming Language :: Python :: 3', 80 | 'Programming Language :: Python :: 3.6', 81 | ], 82 | ) 83 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist= 3 | py{36} 4 | lint 5 | doctest 6 | 7 | [isort] 8 | combine_as_imports=True 9 | force_sort_within_sections=True 10 | skip=__init__.py 11 | include_trailing_comma=True 12 | known_third_party=pytest,requests_mock 13 | known_first_party=ethpm 14 | line_length=88 15 | multi_line_output=3 16 | force_grid_wrap=0 17 | use_parentheses=True 18 | 19 | [flake8] 20 | max-line-length= 100 21 | exclude= tests,venv,docs 22 | 23 | [testenv] 24 | usedevelop=True 25 | passenv= 26 | SOLC_BINARY 27 | LD_LIBRARY_PATH 28 | commands= 29 | pytest tests/ {posargs:tests} 30 | doctest: make -C {toxinidir}/docs doctest 31 | extras= 32 | test 33 | doctest: doc 34 | basepython = 35 | doctest: python 36 | py36: python3.6 37 | whitelist_externals=make 38 | 39 | [testenv:lint] 40 | whitelist_externals=black 41 | basepython=python 42 | deps=flake8 43 | extras=lint 44 | commands= 45 | flake8 {toxinidir}/tests {toxinidir}/ethpm 46 | mypy --follow-imports=silent --ignore-missing-imports --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs --disallow-any-generics --warn-unused-ignore -p ethpm 47 | black --check --diff {toxinidir}/ethpm/ --check --diff {toxinidir}/tests/ 48 | isort --check-only --recursive --diff {toxinidir}/ethpm/ {toxinidir}/tests/ 49 | --------------------------------------------------------------------------------