Skip to content

Commit fcf1251

Browse files
authored
Merge pull request #38 from pipermerriam/piper/bumpversion-and-drop-gevent
Drop Gevent and switch to bumpversion
2 parents 22c2571 + eb615bd commit fcf1251

18 files changed

+127
-87
lines changed

.bumpversion.cfg

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[bumpversion]
2+
current_version = 0.7.1
3+
commit = True
4+
tag = True
5+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<stage>[^.]*)\.(?P<devnum>\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+

.travis.yml

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ python:
33
- "3.5"
44
os:
55
- linux
6-
#- osx
76
dist: trusty
87
sudo: required
98
env:
@@ -23,95 +22,95 @@ matrix:
2322
env: TOX_POSARGS="-e py35-installation"
2423
# solc 0.4.1
2524
- python: "2.7"
26-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.1
25+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.1
2726
- python: "3.4"
28-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.1
27+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.1
2928
- python: "3.5"
30-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.1
29+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.1
3130
# solc 0.4.2
3231
- python: "2.7"
33-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.2
32+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.2
3433
- python: "3.4"
35-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.2
34+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.2
3635
- python: "3.5"
37-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.2
36+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.2
3837
# solc 0.4.6
3938
- python: "2.7"
40-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.6
39+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.6
4140
- python: "3.4"
42-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.6
41+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.6
4342
- python: "3.5"
44-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.6
43+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.6
4544
# solc 0.4.7
4645
- python: "2.7"
47-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.7
46+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.7
4847
- python: "3.4"
49-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.7
48+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.7
5049
- python: "3.5"
51-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.7
50+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.7
5251
# solc 0.4.8
5352
- python: "2.7"
54-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.8
53+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.8
5554
- python: "3.4"
56-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.8
55+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.8
5756
- python: "3.5"
58-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.8
57+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.8
5958
# solc 0.4.9
6059
- python: "2.7"
61-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.9
60+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.9
6261
- python: "3.4"
63-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.9
62+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.9
6463
- python: "3.5"
65-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.9
64+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.9
6665
# solc 0.4.11
6766
- python: "2.7"
68-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.11
67+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.11
6968
- python: "3.4"
70-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.11
69+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.11
7170
- python: "3.5"
72-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.11
71+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.11
7372
# solc 0.4.12
7473
- python: "2.7"
75-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.12
74+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.12
7675
- python: "3.4"
77-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.12
76+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.12
7877
- python: "3.5"
79-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.12
78+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.12
8079
# solc 0.4.13
8180
- python: "2.7"
82-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.13
81+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.13
8382
- python: "3.4"
84-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.13
83+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.13
8584
- python: "3.5"
86-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.13
85+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.13
8786
# solc 0.4.14
8887
- python: "2.7"
89-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.14
88+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.14
9089
- python: "3.4"
91-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.14
90+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.14
9291
- python: "3.5"
93-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.14
92+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.14
9493
# solc 0.4.15
9594
- python: "2.7"
96-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.15
95+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.15
9796
- python: "3.4"
98-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.15
97+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.15
9998
- python: "3.5"
100-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.15
99+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.15
101100
# solc 0.4.16
102101
- python: "2.7"
103-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.16
102+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.16
104103
- python: "3.4"
105-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.16
104+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.16
106105
- python: "3.5"
107-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.16
106+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.16
108107
# solc 0.4.17
109108
- python: "2.7"
110-
env: TOX_POSARGS="-e py27-stdlib -e py27-gevent" SOLC_VERSION=v0.4.17
109+
env: TOX_POSARGS="-e py27" SOLC_VERSION=v0.4.17
111110
- python: "3.4"
112-
env: TOX_POSARGS="-e py34-stdlib -e py34-gevent" SOLC_VERSION=v0.4.17
111+
env: TOX_POSARGS="-e py34" SOLC_VERSION=v0.4.17
113112
- python: "3.5"
114-
env: TOX_POSARGS="-e py35-stdlib -e py35-gevent" SOLC_VERSION=v0.4.17
113+
env: TOX_POSARGS="-e py35" SOLC_VERSION=v0.4.17
115114
cache:
116115
- pip: true
117116
before_install:

README.md

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Python wrapper around the `solc` Solidity compiler.
99

1010

11-
# Dependency
11+
## Dependency
1212

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

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

2020

21-
# Quickstart
21+
## Quickstart
2222

2323
Installation
2424

2525
```sh
2626
pip install py-solc
2727
```
2828

29-
Or to install with support for gevent
29+
## Development
30+
31+
Clone the repository and then run:
32+
33+
```sh
34+
pip install -e . -r requirements-dev.txt
35+
```
36+
37+
38+
### Running the tests
39+
40+
You can run the tests with:
41+
42+
```sh
43+
py.test tests
44+
```
45+
46+
Or you can install `tox` to run the full test suite.
47+
48+
49+
### Releasing
50+
51+
Pandoc is required for transforming the markdown README to the proper format to
52+
render correctly on pypi.
53+
54+
For Debian-like systems:
55+
56+
```
57+
apt install pandoc
58+
```
59+
60+
Or on OSX:
61+
62+
```sh
63+
brew install pandoc
64+
```
65+
66+
To release a new version:
3067

3168
```sh
32-
pip install py-solc[gevent]
69+
bumpversion $$VERSION_PART_TO_BUMP$$
70+
git push && git push --tags
71+
make release
3372
```
3473

35-
To enable gevent subprocessing set the environment variable `SOLC_THREADING_BACKEND=gevent`
74+
75+
#### How to bumpversion
76+
77+
The version format for this repo is `{major}.{minor}.{patch}` for stable, and
78+
`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).
79+
80+
To issue the next version in line, use bumpversion and specify which part to bump,
81+
like `bumpversion minor` or `bumpversion devnum`.
82+
83+
If you are in a beta version, `bumpversion stage` will switch to a stable.
84+
85+
To issue an unstable version when the current version is stable, specify the
86+
new version explicitly, like `bumpversion --new-version 4.0.0-alpha.1 devnum`
87+
88+
3689

3790

3891
## Standard JSON Compilation

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pytest>=2.9.2
22
tox>=2.3.1
33
semantic_version>=2.6.0
4+
bumpversion==0.5.3

setup.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,30 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
import os
4-
53
from setuptools import (
64
setup,
75
find_packages,
86
)
97

108

11-
DIR = os.path.dirname(os.path.abspath(__file__))
12-
13-
readme = open(os.path.join(DIR, 'README.md')).read()
14-
15-
169
setup(
1710
name='py-solc',
1811
version="1.4.0",
1912
description="""Python wrapper around the solc binary""",
20-
long_description=readme,
13+
long_description_markdown_filename='README.md',
2114
author='Piper Merriam',
2215
author_email='[email protected]',
2316
url='https://github.com/pipermerriam/py-solc',
2417
include_package_data=True,
2518
py_modules=['solc'],
19+
setup_requires=['setuptools-markdown'],
2620
install_requires=[
2721
"semantic_version>=2.6.0",
2822
],
29-
extras_require={
30-
'gevent': [
31-
"gevent>=1.1.1,<1.2.0",
32-
],
33-
},
3423
license="MIT",
3524
zip_safe=False,
3625
keywords='ethereum solidity solc',
3726
packages=find_packages(exclude=["tests", "tests.*"]),
3827
classifiers=[
39-
'Development Status :: 2 - Pre-Alpha',
4028
'Intended Audience :: Developers',
4129
'License :: OSI Approved :: MIT License',
4230
'Natural Language :: English',

solc/compat.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

solc/wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import absolute_import
22

33
import os
4+
import subprocess
45

5-
from .compat import subprocess
66
from .exceptions import (
77
SolcError,
88
)

0 commit comments

Comments
 (0)