eth-owned

EIP-173 interface and tools for chainlib-eth
git clone git://holbrook.no/eth-owned.git
Log | Files | Refs

commit af5fdb15fa00600aac7c9b35662f50a714455821
parent e4f08d353404d029bf4b2f505bbdffa35e431cdc
Author: nolash <dev@holbrook.no>
Date:   Sat, 17 Apr 2021 11:30:57 +0200

Add packaging, makefile

Diffstat:
Apython/LICENSE | 45+++++++++++++++++++++++++++++++++++++++++++++
Apython/Makefile | 11+++++++++++
Apython/eth_owned/__init__.py | 2++
Rpython/eth_owner/data/Owned.bin -> python/eth_owned/data/Owned.bin | 0
Rpython/eth_owner/data/Owned.json -> python/eth_owned/data/Owned.json | 0
Rpython/eth_owner/data/VoidOwner.bin -> python/eth_owned/data/VoidOwner.bin | 0
Rpython/eth_owner/data/VoidOwner.json -> python/eth_owned/data/VoidOwner.json | 0
Rpython/eth_owner/data/__init__.py -> python/eth_owned/data/__init__.py | 0
Rpython/eth_owner/owned.py -> python/eth_owned/owned.py | 0
Rpython/eth_owner/void.py -> python/eth_owned/void.py | 0
Dpython/eth_owner/__init__.py | 2--
Apython/setup.cfg | 44++++++++++++++++++++++++++++++++++++++++++++
Apython/setup.py | 32++++++++++++++++++++++++++++++++
Mpython/tests/test_basic.py | 4++--
Msolidity/Makefile | 4++--
15 files changed, 138 insertions(+), 6 deletions(-)

diff --git a/python/LICENSE b/python/LICENSE @@ -0,0 +1,45 @@ + Bprotocol Foundation (Bancor) LICENSE + +1. SUBJECT TO THE PROVISIONS SET FORTH HEREIN, INCLUDING “EFFECTIVE DATE”, YOU CAN + USE THIS CODE, FILE AND/OR SOFTWARE (“SOFTWARE”) ONLY IN CONNECTION WITH THE + BANCOR LIQUIDITY NETWORK AND/OR THE USE OF BNT ("PERMITTED USE"). ANY OTHER USE IS + PROHIBITED UNLESS THE USER SHALL RECEIVE AN EXPLICIT PRIOR WRITTEN APPROVAL FROM + BPROTOCOL FOUNDATION (BANCOR) TO DO SO (PLEASE CONTACT license@bancor.network IN + THIS REGARD), WHICH APPROVAL, IF GIVEN, MAY REQUIRE THE OBTAINMENT OF SEPARATE + LICENSE UNDER A DIFFERENT LICENSING MODEL. USING THIS SOFTWARE NOT IN THE FRAME OF + SUCH PERMITTED USE MAY, AMONG OTHERS, ALSO BREACH PATENT RIGHTS CONCERNING PATENTS + WHICH ARE EMBODIED/INCORPORATED/USED IN THIS SOFTWARE. + +2. ANY SUCH PERMITTED USE SHOULD ALSO COMPLY WITH THE TERMS BELOW. + +3. Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +A. Redistributions of source code must retain the above copyright notice, this list + of conditions and the following disclaimer. +B. Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. +C. Neither the name of the copyright holder nor the names of its contributors may be + used to endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +EFFECTIVE DATE: THIS LICENSE SHALL APPLY ONLY TO SOFTWARE (OR ANY VERSION THEREOF), +THAT HAS BEEN PUBLISHED AFTER THE DATE AND TIME THIS LICENSE HAS BEEN FIRST PUBLISHED +(“EFFECTIVE DATE”); Any previous versions published prior to the effective date (“Older Versions”) +shall remain licensed under the Apache License, Version 2.0 (the "Older Versions License"); +You may obtain a copy of the Older Version License at http://www.apache.org/licenses/LICENSE-2.0 +you may not use this file except in compliance with the Older Version License. Unless +required by applicable law or agreed to in writing, Older Versions distributed under the +Older Version License are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, either express or implied. See the Older Version License for the specific +language governing permissions and limitations under the Older Version License. diff --git a/python/Makefile b/python/Makefile @@ -0,0 +1,11 @@ +PACKAGE=eth_owned + +build: + python setup.py bdist_wheel + +.PHONY clean: + rm -rf build + rm -rf dist + rm -rf $(PACKAGE).egg-info + +.PHONY dist: clean build diff --git a/python/eth_owned/__init__.py b/python/eth_owned/__init__.py @@ -0,0 +1,2 @@ +from .owned import Owned +from eth_owned.data import data_dir diff --git a/python/eth_owner/data/Owned.bin b/python/eth_owned/data/Owned.bin diff --git a/python/eth_owner/data/Owned.json b/python/eth_owned/data/Owned.json diff --git a/python/eth_owner/data/VoidOwner.bin b/python/eth_owned/data/VoidOwner.bin diff --git a/python/eth_owner/data/VoidOwner.json b/python/eth_owned/data/VoidOwner.json diff --git a/python/eth_owner/data/__init__.py b/python/eth_owned/data/__init__.py diff --git a/python/eth_owner/owned.py b/python/eth_owned/owned.py diff --git a/python/eth_owner/void.py b/python/eth_owned/void.py diff --git a/python/eth_owner/__init__.py b/python/eth_owner/__init__.py @@ -1,2 +0,0 @@ -from .owned import Owned -from eth_owner.data import data_dir diff --git a/python/setup.cfg b/python/setup.cfg @@ -0,0 +1,44 @@ +[metadata] +name = eth-owned +version = 0.0.1a2 +description = EIP 172 interface and tools +author = Louis Holbrook +author_email = dev@holbrook.no +url = https://gitlab.com/nolash/eth-owned +keywords = + ethereum +classifiers = + Programming Language :: Python :: 3 + Operating System :: OS Independent + Development Status :: 3 - Alpha + Environment :: No Input/Output (Daemon) + Intended Audience :: Developers + License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) + Topic :: Internet + Topic :: Development :: Libraries + #Topic :: Blockchain :: EVM +license = GPL3 +licence_files = + LICENSE.txt + +[options] +include_package_data = True +python_requires = >= 3.6 +packages = + eth_owned + eth_owned.data + +[options.extras_require] +testing = + pytest==6.0.1 + eth-tester==0.5.0b2 + py-evm==0.3.0a20 + +[options.package_data] +* = + **/data/*.json + **/data/*.bin + +[options.entry_points] +console_scripts = + eth-owner-void-deploy = eth_owned.runnable.void_deploy:main diff --git a/python/setup.py b/python/setup.py @@ -0,0 +1,32 @@ +from setuptools import setup + +requirements = [] +f = open('requirements.txt', 'r') +while True: + l = f.readline() + if l == '': + break + requirements.append(l.rstrip()) +f.close() + +test_requirements = [] +f = open('test_requirements.txt', 'r') +while True: + l = f.readline() + if l == '': + break + test_requirements.append(l.rstrip()) +f.close() + + +setup( + package_data={ + '': [ + 'data/*.abi.json', + 'data/*.bin', + ], + }, + include_package_data=True, + install_requires=requirements, + tests_require=test_requirements, + ) diff --git a/python/tests/test_basic.py b/python/tests/test_basic.py @@ -26,8 +26,8 @@ from chainlib.eth.contract import ( from hexathon import add_0x # local imports -from eth_owner.void import VoidOwner -from eth_owner import ( +from eth_owned.void import VoidOwner +from eth_owned import ( Owned, data_dir, ) diff --git a/solidity/Makefile b/solidity/Makefile @@ -12,7 +12,7 @@ test: all python ../python/tests/test_basic.py install: all - cp -v VoidOwner.{json,bin} ../python/eth_owner/data/ - cp -v Owned.{json,bin} ../python/eth_owner/data/ + cp -v VoidOwner.{json,bin} ../python/eth_owned/data/ + cp -v Owned.{json,bin} ../python/eth_owned/data/ .PHONY: test install