-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ | |
count | ||
] | ||
|
||
__version__ = "0.7.1" | ||
__version__ = "0.8.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Setup for checksig package""" | ||
import sys | ||
from distutils.errors import CompileError | ||
from subprocess import call | ||
|
||
from setuptools import Extension, setup, find_packages | ||
from setuptools.command.build_ext import build_ext | ||
|
||
|
||
class build_go_ext(build_ext): | ||
"""Custom command to build extension from Go source files""" | ||
def build_extension(self, ext): | ||
ext_path = self.get_ext_fullpath(ext.name) | ||
cmd = ['go', 'build', '-buildmode=c-shared', '-o', ext_path] | ||
cmd += ext.sources | ||
out = call(cmd) | ||
if out != 0: | ||
raise CompileError('Go build failed') | ||
|
||
setup( | ||
name='pygrip', | ||
version='0.8.0', | ||
packages=find_packages(include=['pygrip']), | ||
#py_modules=['pygrip'], | ||
ext_modules=[ | ||
Extension('pygrip/_pygrip', ['./pygrip/wrapper.go']) | ||
], | ||
cmdclass={'build_ext': build_go_ext}, | ||
install_requires=[ | ||
"gripql>=0.8.0" | ||
], | ||
zip_safe=False, | ||
) |