generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build GoReSym from source on wheel build #18
* Update Makefile to set proper build variables Signed-off-by: Jono Yang <jyang@nexb.com>
- Loading branch information
Showing
4 changed files
with
66 additions
and
2 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
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,25 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved. | ||
# | ||
|
||
set -e | ||
|
||
base_name=GoReSym-3.0.1 | ||
|
||
cd lib-src/ | ||
|
||
rm -rf $base_name | ||
tar -xf $base_name.tar.gz | ||
|
||
cd $base_name/ | ||
|
||
|
||
echo Build GoReSym | ||
go build && mv GoReSym GoReSym_lin | ||
strip GoReSym_lin | ||
cp GoReSym_lin ../../src/go_inspector/bin/ | ||
cd .. | ||
echo Done building GoReSym | ||
|
||
rm -rf $base_name/ |
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,31 @@ | ||
#!/usr/bin/env python | ||
|
||
import subprocess | ||
from distutils.command.build import build as distutils_build | ||
from distutils.errors import LibError | ||
|
||
import setuptools | ||
from setuptools.command.develop import develop as setuptools_develop | ||
|
||
|
||
def run_native_build(): | ||
exitcode, output = subprocess.getstatusoutput(["./build.sh"]) | ||
print(output) | ||
if exitcode: | ||
raise LibError("Unable to build native") | ||
|
||
|
||
class BuildNative(distutils_build): | ||
def run(self): | ||
self.execute(run_native_build, (), msg="Building native code") | ||
distutils_build.run(self) | ||
|
||
|
||
class DevelopNative(setuptools_develop): | ||
def run(self): | ||
self.execute(run_rpm_build, (), msg="Building develop native code") | ||
setuptools_develop.run(self) | ||
|
||
|
||
if __name__ == "__main__": | ||
setuptools.setup() | ||
setuptools.setup(cmdclass={"build": BuildNative, "develop": DevelopNative}) |