Skip to content

Commit

Permalink
Remove tarred files, prepare for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
mariano54 committed Aug 9, 2018
1 parent e522183 commit 577d06c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ src/cmake_install.cmake
src/CMakeFile
build/*
blspy.egg-info
dist

main
.o
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include README.md LICENSE
global-include CMakeLists.txt *.cmake
recursive-include cmake_modules *
recursive-include src *
recursive-include python *
recursive-include contrib *
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ skChild.Serialize(buffer2);
### Build
Cmake and a c++ compiler are required for building.
```bash
git submodule init
git submodule update
cd build
cmake ../
cmake --build . -- -j 6
Expand Down
Binary file removed contrib/gmp-6.1.2.tar.gz
Binary file not shown.
Binary file removed contrib/libsodium-1.0.16.tar.gz
Binary file not shown.
12 changes: 10 additions & 2 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
## Python bindings
Install
```bash
pip3 install blspy
```

To install, run the following, in the project root directory:
To install from source, run the following, in the project root directory:

```bash
git submodule init
git submodule update
pip3 install .
```
If that doesn't work, try python3 setup.py install.

Cmake, a c++ compiler, and a recent version of pip3 are required.
GMP and libsodium are optional dependencies.

Then, to use:

Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class CMakeExtension(Extension):
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
Extension.__init__(self, name, sources=['./'])
self.sourcedir = os.path.abspath(sourcedir)


Expand All @@ -37,6 +37,7 @@ def run(self):
def build_extension(self, ext):
extdir = os.path.abspath(os.path.dirname(
self.get_ext_fullpath(ext.name)))
print("EXTDIR IS", extdir)
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
'-DPYTHON_EXECUTABLE=' + sys.executable]

Expand Down Expand Up @@ -67,13 +68,13 @@ def build_extension(self, ext):

setup(
name='blspy',
version='0.0.1',
version='0.0.3',
author='Mariano Sorgente',
author_email='[email protected]',
description='BLS signatures in c++ (python bindings)',
python_requires='>3.1',
long_description='',
ext_modules=[CMakeExtension('blspy')],
long_description='BLS signatures with aggregation. Uses fast c++ implementation. See https://github.com/Chia-Network/bls-signatures for more details',
ext_modules=[CMakeExtension('blspy', '.')],
cmdclass=dict(build_ext=CMakeBuild),
zip_safe=False,
)

0 comments on commit 577d06c

Please sign in to comment.