Skip to content

Commit 328cc4f

Browse files
committed
initial commit
0 parents  commit 328cc4f

File tree

12 files changed

+338
-0
lines changed

12 files changed

+338
-0
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
* `py-solc` Version: x.x.x
2+
* `solc` Version: x.x.x
3+
* Python Version: x.x.x
4+
* OS: osx/linux/win
5+
6+
7+
### What was wrong?
8+
9+
Please include information like:
10+
11+
* full output of the error you received
12+
* what command you ran
13+
* the code that caused the failure
14+
15+
#### Cute Animal Picture
16+
17+
> put a cute animal picture here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### What was wrong?
2+
3+
4+
5+
### How was it fixed?
6+
7+
8+
9+
#### Cute Animal Picture
10+
11+
> put a cute animal picture here.

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
*.py[cod]
2+
3+
# C extensions
4+
*.so
5+
6+
# Packages
7+
*.egg
8+
*.egg-info
9+
dist
10+
build
11+
eggs
12+
parts
13+
bin
14+
var
15+
sdist
16+
develop-eggs
17+
.installed.cfg
18+
lib
19+
lib64
20+
21+
# Installer logs
22+
pip-log.txt
23+
24+
# Unit test / coverage reports
25+
.coverage
26+
.tox
27+
nosetests.xml
28+
29+
# Translations
30+
*.mo
31+
32+
# Mr Developer
33+
.mr.developer.cfg
34+
.project
35+
.pydevproject
36+
37+
# Complexity
38+
output/*.html
39+
output/*/index.html
40+
41+
# Sphinx
42+
docs/_build
43+
44+
# Blockchain
45+
**/chains/*/nodes/*
46+
**/chains/*/nodekey
47+
**/chains/*/dapp/*
48+
**/chains/*/chaindata/*
49+
50+
# Known Contracts
51+
**/known_contracts.json

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: python
2+
python:
3+
- "3.5"
4+
dist: trusty
5+
sudo: required
6+
before_install:
7+
- travis_retry sudo add-apt-repository -y ppa:ethereum/ethereum
8+
- travis_retry sudo apt-get update
9+
- travis_retry sudo apt-get install -y ethereum
10+
- mkdir -p ~/.ethash
11+
- geth makedag 0 ~/.ethash
12+
cache:
13+
pip: true
14+
directories:
15+
- ~/.ethash
16+
env:
17+
matrix:
18+
- TOX_ENV=py27
19+
- TOX_ENV=py34
20+
- TOX_ENV=py35
21+
- TOX_ENV=flake8
22+
cache: pip
23+
install:
24+
- travis_retry pip install setuptools --upgrade
25+
- travis_retry pip install tox
26+
script:
27+
- tox -e $TOX_ENV
28+
after_script:
29+
- cat .tox/$TOX_ENV/log/*.log

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0.1.0
2+
-----
3+
4+
- Initial Release

CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Development
2+
3+
To start development for Populus you should begin by cloning the repo.
4+
5+
```bash
6+
$ git clone [email protected]/pipermerriam/py-solc.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
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.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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.

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include LICENSE
2+
include README.md
3+
include requirements.txt
4+
5+
recursive-exclude * __pycache__
6+
recursive-exclude * *.py[co]

Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.PHONY: clean-pyc clean-build
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 "sdist - 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 solc
26+
27+
test:
28+
py.test tests
29+
30+
test-all:
31+
tox
32+
33+
release: clean
34+
python setup.py sdist bdist bdist_wheel upload
35+
36+
sdist: clean
37+
python setup.py sdist bdist bdist_wheel
38+
ls -l dist

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# py-solc
2+
3+
[![Build Status](https://travis-ci.org/pipermerriam/py-solc.png)](https://travis-ci.org/pipermerriam/py-solc)
4+
[![PyPi version](https://pypip.in/v/py-solc/badge.png)](https://pypi.python.org/pypi/py-solc)
5+
[![PyPi downloads](https://pypip.in/d/py-solc/badge.png)](https://pypi.python.org/pypi/py-solc)
6+
7+
8+
Python wrapper around the `solc` solidity compiler.
9+
10+
11+
# Dependency
12+
13+
This library requires the `solc` executable to be present.
14+
15+
16+
# Quickstart
17+
18+
Installation
19+
20+
```sh
21+
pip install py-solc
22+
```
23+
24+
```python
25+
>>> from solc import compile_source, compile_files
26+
>>> compile_source("contract Foo { function Foo() {} }")
27+
{
28+
'Foo': {
29+
'abi': [{'inputs': [], 'type': 'constructor'}],
30+
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
31+
'code_runtime': '0x60606040526008565b00',
32+
'source': None,
33+
'meta': {
34+
'compilerVersion': '0.3.5-9da08ac3',
35+
'language': 'Solidity',
36+
'languageVersion': '0',
37+
},
38+
},
39+
}
40+
>>> compile_source(["/path/to/Foo.sol", "/path/to/Bar.sol"])
41+
{
42+
'Foo': {
43+
'abi': [{'inputs': [], 'type': 'constructor'}],
44+
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
45+
'code_runtime': '0x60606040526008565b00',
46+
'source': None,
47+
'meta': {
48+
'compilerVersion': '0.3.5-9da08ac3',
49+
'language': 'Solidity',
50+
'languageVersion': '0',
51+
},
52+
},
53+
'Bar': {
54+
'abi': [{'inputs': [], 'type': 'constructor'}],
55+
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
56+
'code_runtime': '0x60606040526008565b00',
57+
'source': None,
58+
'meta': {
59+
'compilerVersion': '0.3.5-9da08ac3',
60+
'language': 'Solidity',
61+
'languageVersion': '0',
62+
},
63+
},
64+
}
65+
```

0 commit comments

Comments
 (0)