mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-12-21 10:59:03 +00:00
Remove this dependency inclusion thing in src packages
It's pointless and wasteful.
This commit is contained in:
parent
3aa99c396b
commit
215307df93
10
bootstrap.sh
10
bootstrap.sh
@ -13,12 +13,6 @@ if [ -d ".git" ]; then
|
|||||||
git submodule update
|
git submodule update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "deps" ]; then
|
|
||||||
# We have a collection of dependencies in our source package. We might as well use it instead
|
|
||||||
# of downloading it from PyPI.
|
|
||||||
PIPARGS="--no-index --find-links=deps"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "env" ]; then
|
if [ ! -d "env" ]; then
|
||||||
echo "No virtualenv. Creating one"
|
echo "No virtualenv. Creating one"
|
||||||
# We need a "system-site-packages" env to have PyQt, but we also need to ensure a local pip
|
# We need a "system-site-packages" env to have PyQt, but we also need to ensure a local pip
|
||||||
@ -37,10 +31,10 @@ source env/bin/activate
|
|||||||
|
|
||||||
echo "Installing pip requirements"
|
echo "Installing pip requirements"
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
./env/bin/pip install $PIPARGS -r requirements-osx.txt
|
./env/bin/pip install -r requirements-osx.txt
|
||||||
else
|
else
|
||||||
./env/bin/python -c "import PyQt5" >/dev/null 2>&1 || { echo >&2 "PyQt 5.4+ required. Install it and try again. Aborting"; exit 1; }
|
./env/bin/python -c "import PyQt5" >/dev/null 2>&1 || { echo >&2 "PyQt 5.4+ required. Install it and try again. Aborting"; exit 1; }
|
||||||
./env/bin/pip install $PIPARGS -r requirements.txt
|
./env/bin/pip install -r requirements.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Bootstrapping complete! You can now configure, build and run dupeGuru with:"
|
echo "Bootstrapping complete! You can now configure, build and run dupeGuru with:"
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# The goal here is to have a folder with all packages needed as dependencies by the project. The
|
|
||||||
# obvious solution is "pip install --download deps -r requirements.txt", but this thing doesn't
|
|
||||||
# follow sub-dependencies. The 2nd obvious solution would be to use the result of a `pip freeze`
|
|
||||||
# instead of requirements.txt, but this command outputs everything on the system, which isn't cool.
|
|
||||||
# So, what about "pip freeze -l"? That would work, unless one of the dependencies is installed
|
|
||||||
# system-wide (Sphinx often is). We can't disable system site packages because we need PyQt, which
|
|
||||||
# is always installed globally.
|
|
||||||
|
|
||||||
# So, what we do here is that we create a brand new venv just for dependencies download, which
|
|
||||||
# we'll pip freeze.
|
|
||||||
|
|
||||||
rm -rf deps
|
|
||||||
rm -rf depsenv
|
|
||||||
mkdir deps
|
|
||||||
|
|
||||||
python3 -m venv depsenv
|
|
||||||
source depsenv/bin/activate
|
|
||||||
python get-pip.py
|
|
||||||
pip install -r requirements.txt
|
|
||||||
pip freeze -l > deps/requirements.freeze
|
|
||||||
pip install --download=deps -r deps/requirements.freeze setuptools pip
|
|
||||||
deactivate
|
|
||||||
rm -rf depsenv
|
|
@ -99,16 +99,11 @@ def package_arch():
|
|||||||
filereplace(op.join('pkg', 'arch', 'dupeguru.desktop'), op.join(srcpath, 'dupeguru.desktop'), **debopts)
|
filereplace(op.join('pkg', 'arch', 'dupeguru.desktop'), op.join(srcpath, 'dupeguru.desktop'), **debopts)
|
||||||
|
|
||||||
def package_source_tgz():
|
def package_source_tgz():
|
||||||
if not op.exists('deps'):
|
|
||||||
print("Downloading PyPI dependencies")
|
|
||||||
print_and_do('./download_deps.sh')
|
|
||||||
print("Creating git archive")
|
print("Creating git archive")
|
||||||
app_version = get_module_version('core')
|
app_version = get_module_version('core')
|
||||||
name = 'dupeguru-src-{}.tar'.format(app_version)
|
name = 'dupeguru-src-{}.tar'.format(app_version)
|
||||||
dest = op.join('build', name)
|
dest = op.join('build', name)
|
||||||
print_and_do('git archive -o {} HEAD'.format(dest))
|
print_and_do('git archive -o {} HEAD'.format(dest))
|
||||||
print("Adding dependencies and wrapping up")
|
|
||||||
print_and_do('tar -rf {} deps'.format(dest))
|
|
||||||
print_and_do('gzip {}'.format(dest))
|
print_and_do('gzip {}'.format(dest))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user