Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[bumpversion]
current_version = 0.7.1
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<stage>[^.]*)\.(?P<devnum>\d+))?
serialize =
{major}.{minor}.{patch}-{stage}.{devnum}
{major}.{minor}.{patch}

[bumpversion:part:stage]
optional_value = stable
first_value = stable
values =
alpha
beta
stable

[bumpversion:part:devnum]

[bumpversion:file:setup.py]
search = version='{current_version}',
replace = version='{new_version}',

79 changes: 39 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ python:
- "3.5"
os:
- linux
#- osx
dist: trusty
sudo: required
env:
Expand All @@ -23,95 +22,95 @@ matrix:
env: TOX_POSARGS="-e py35-installation"
# solc 0.4.1
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.1
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.1
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.1
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.1
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.1
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.1
# solc 0.4.2
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.2
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.2
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.2
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.2
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.2
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.2
# solc 0.4.6
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.6
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.6
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.6
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.6
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.6
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.6
# solc 0.4.7
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.7
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.7
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.7
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.7
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.7
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.7
# solc 0.4.8
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.8
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.8
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.8
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.8
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.8
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.8
# solc 0.4.9
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.9
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.9
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.9
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.9
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.9
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.9
# solc 0.4.11
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.11
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.11
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.11
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.11
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.11
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.11
# solc 0.4.12
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.12
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.12
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.12
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.12
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.12
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.12
# solc 0.4.13
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.13
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.13
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.13
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.13
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.13
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.13
# solc 0.4.14
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.14
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.14
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.14
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.14
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.14
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.14
# solc 0.4.15
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.15
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.15
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.15
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.15
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.15
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.15
# solc 0.4.16
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.16
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.16
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.16
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.16
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.16
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.16
# solc 0.4.17
- python: "2.7"
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.17
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.17
- python: "3.4"
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.17
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.17
- python: "3.5"
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.17
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.17
cache:
- pip: true
before_install:
Expand Down
63 changes: 58 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Python wrapper around the `solc` Solidity compiler.


# Dependency
## Dependency

This library requires the `solc` executable to be present.

Expand All @@ -18,21 +18,74 @@ with other versions.
[solc installation instructions](http://solidity.readthedocs.io/en/latest/installing-solidity.html)


# Quickstart
## Quickstart

Installation

```sh
pip install py-solc
```

Or to install with support for gevent
## Development

Clone the repository and then run:

```sh
pip install -e . -r requirements-dev.txt
```


### Running the tests

You can run the tests with:

```sh
py.test tests
```

Or you can install `tox` to run the full test suite.


### Releasing

Pandoc is required for transforming the markdown README to the proper format to
render correctly on pypi.

For Debian-like systems:

```
apt install pandoc
```

Or on OSX:

```sh
brew install pandoc
```

To release a new version:

```sh
pip install py-solc[gevent]
bumpversion $$VERSION_PART_TO_BUMP$$
git push && git push --tags
make release
```

To enable gevent subprocessing set the environment variable `SOLC_THREADING_BACKEND=gevent`

#### How to bumpversion

The version format for this repo is `{major}.{minor}.{patch}` for stable, and
`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).

To issue the next version in line, use bumpversion and specify which part to bump,
like `bumpversion minor` or `bumpversion devnum`.

If you are in a beta version, `bumpversion stage` will switch to a stable.

To issue an unstable version when the current version is stable, specify the
new version explicitly, like `bumpversion --new-version 4.0.0-alpha.1 devnum`




## Standard JSON Compilation
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pytest>=2.9.2
tox>=2.3.1
semantic_version>=2.6.0
bumpversion==0.5.3
16 changes: 2 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,30 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os

from setuptools import (
setup,
find_packages,
)


DIR = os.path.dirname(os.path.abspath(__file__))

readme = open(os.path.join(DIR, 'README.md')).read()


setup(
name='py-solc',
version="1.4.0",
description="""Python wrapper around the solc binary""",
long_description=readme,
long_description_markdown_filename='README.md',
author='Piper Merriam',
author_email='pipermerriam@gmail.com',
url='https://github.com/pipermerriam/py-solc',
include_package_data=True,
py_modules=['solc'],
setup_requires=['setuptools-markdown'],
install_requires=[
"semantic_version>=2.6.0",
],
extras_require={
'gevent': [
"gevent>=1.1.1,<1.2.0",
],
},
license="MIT",
zip_safe=False,
keywords='ethereum solidity solc',
packages=find_packages(exclude=["tests", "tests.*"]),
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
Expand Down
21 changes: 0 additions & 21 deletions solc/compat.py

This file was deleted.

2 changes: 1 addition & 1 deletion solc/wrapper.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import absolute_import

import os
import subprocess

from .compat import subprocess
from .exceptions import (
SolcError,
)
Expand Down
9 changes: 3 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[tox]
envlist=
py{27,34,35}-{gevent,stdlib},
py{27,34,35}-installation
py{27,34,35}-{core,installation}
flake8

[flake8]
Expand All @@ -10,17 +9,15 @@ exclude= tests/*

[testenv]
commands=
{gevent,stdlib}: py.test {posargs:tests}
py{27,34,35}-installation: py.test {posargs:-s tests/installation}
core: py.test {posargs:tests/core}
installation: py.test {posargs:-s tests/installation}
passenv =
SOLC_BINARY
TRAVIS_BUILD_DIR
setenv =
gevent: SOLC_THREADING_BACKEND=gevent
py{27,34,35}-installation: SOLC_RUN_INSTALL_TESTS=enabled
deps =
-r{toxinidir}/requirements-dev.txt
gevent: gevent>=1.1.1,<1.2.0
basepython =
py27: python2.7
py34: python3.4
Expand Down