-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace server with Go version. Change build process.
- Loading branch information
Showing
101 changed files
with
3,355 additions
and
5,567 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 |
---|---|---|
|
@@ -3,3 +3,5 @@ build | |
dist/ | ||
exactly.egg-info | ||
test.py | ||
.venv | ||
.vscode |
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
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,2 @@ | ||
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version} | ||
%global debug_package %{nil} |
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,26 +1,16 @@ | ||
from setuptools import setup | ||
|
||
|
||
def get_version(): | ||
try: | ||
with open("/opt/exactly/lib/python/VERSION", "r") as f: | ||
return f.read() | ||
except Exception as e: | ||
print("You need to supply VERSION file") | ||
raise e | ||
|
||
|
||
unified_version = get_version() | ||
print("Using version: " + unified_version) | ||
from os import getenv | ||
|
||
setup(name='exactly', | ||
version=unified_version, | ||
version=getenv('EXACTLY_VERSION'), | ||
description='Binary exact search', | ||
url='http://github.com/mlinhard/exactly', | ||
author='Michal Linhard', | ||
author_email='[email protected]', | ||
license='Apache 2.0', | ||
packages=['exactly'], | ||
scripts=['bin/exactly'], | ||
data_files=[('bin', ['bin/exactly-index'])], | ||
zip_safe=False, | ||
install_requires=[ | ||
'docopt', 'requests' | ||
|
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,29 @@ | ||
#!/bin/bash | ||
if [ "$1" != "update" ]; then | ||
rm -rf .venv | ||
python3 -m virtualenv .venv | ||
fi | ||
|
||
source .venv/bin/activate | ||
|
||
export EXACTLY_VERSION=`git describe --tags` | ||
|
||
if [ ! -f bin/exactly-index ]; then | ||
if [ ! -f ../server/exactly-index ]; then | ||
pushd ../server | ||
go build -o exactly-index "-ldflags=-s -w -X main.Version=${EXACTLY_VERSION}" | ||
popd | ||
fi | ||
mv ../server/exactly-index bin | ||
fi | ||
|
||
python3 setup.py install | ||
|
||
# for some reaason the setup in virtualenv doesn't copy bin/exactly-index to .venv/bin | ||
find .venv -name exactly-index -exec rm {} \; | ||
mv bin/exactly-index .venv/bin | ||
|
||
rm -rf build dist exactly.egg-info | ||
|
||
deactivate | ||
|
Oops, something went wrong.