Add better heuristic for build detection

This commit is contained in:
n3hrox
2019-11-10 18:04:41 +01:00
parent 387a471857
commit f4ee4b0434
6 changed files with 55 additions and 6 deletions
+6
View File
@@ -82,6 +82,7 @@ install_dependencies()
sudo apt-get install ruby-dev build-essential rpm python-pip python-dev
elif command_exists brew; then
brew install ruby
brew install git
else
echo "Unable to install fpm dependencies" && exit 1
fi
@@ -101,6 +102,11 @@ install_dependencies()
build_dvc()
{
print_info "Building dvc binary..."
if [[ "$(uname)" != 'Linux' ]]; then
git apply $(pwd)/scripts/darwin.patch
fi
pyinstaller \
--additional-hooks-dir $(pwd)/scripts/hooks dvc/__main__.py \
--name dvc \
+2
View File
@@ -16,11 +16,13 @@ where choco
if %errorlevel% neq 0 (echo Error: choco not found && goto :error)
choco install InnoSetup
choco install git
call refreshenv
where iscc
if %errorlevel% neq 0 (echo Error: Couldn't find Inno Setup compiler. && goto :error)
echo ====== Installing requirements... ======
call git patch scripts/patches/windows.patch
call pip install .[all] || goto :error
call pip install psutil || goto :error
call dvc pull || goto :error
+20
View File
@@ -0,0 +1,20 @@
From 71707795d27aa848d71780b84e056b4f5735650c Mon Sep 17 00:00:00 2001
From: n3hrox <[email protected]>
Date: Sun, 10 Nov 2019 17:35:10 +0100
Subject: [PATCH] Darwin patch
---
dvc/utils/build.py | 1 +
1 file changed, 1 insertion(+)
create mode 100644 dvc/utils/build.py
diff --git a/dvc/utils/build.py b/dvc/utils/build.py
new file mode 100644
index 00000000..3d149b9a
--- /dev/null
+++ b/dvc/utils/build.py
@@ -0,0 +1 @@
+PKG = "darwin"
--
2.17.1
+19
View File
@@ -0,0 +1,19 @@
From 6b53dcffe5e13cb3c196d29a495d8da9bcc26d6d Mon Sep 17 00:00:00 2001
From: n3hrox <[email protected]>
Date: Sun, 10 Nov 2019 15:44:14 +0100
Subject: [PATCH] Windows patch
---
dvc/utils/buid.py | 1 +
1 file changed, 1 insertion(+)
create mode 100644 dvc/utils/buid.py
diff --git a/dvc/utils/buid.py b/dvc/utils/buid.py
new file mode 100644
index 00000000..ada7a0bb
--- /dev/null
+++ b/dvc/utils/buid.py
@@ -0,0 +1 @@
+PKG = "windows"
--
2.17.1