mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
pypi fixes
This commit is contained in:
parent
b0db14d8b0
commit
eb17f57761
|
@ -108,7 +108,8 @@ try the **[read-only demo server](https://a.ocv.me/pub/demo/)** 👀 running fro
|
||||||
|
|
||||||
download **[copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py)** and you're all set!
|
download **[copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py)** and you're all set!
|
||||||
|
|
||||||
if you cannot install python, you can use [copyparty.exe](#copypartyexe) instead
|
* or install through pypi (python3 only): `python3 -m pip install --user -U copyparty`
|
||||||
|
* or if you cannot install python, you can use [copyparty.exe](#copypartyexe) instead
|
||||||
|
|
||||||
running the sfx without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want [accounts and volumes](#accounts-and-volumes)
|
running the sfx without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want [accounts and volumes](#accounts-and-volumes)
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,12 @@ gtar=$(command -v gtar || command -v gnutar) || true
|
||||||
}
|
}
|
||||||
|
|
||||||
mode="$1"
|
mode="$1"
|
||||||
|
fast="$2"
|
||||||
|
|
||||||
[ -z "$mode" ] &&
|
[ -z "$mode" ] &&
|
||||||
{
|
{
|
||||||
echo "need argument 1: (D)ry, (T)est, (U)pload"
|
echo "need argument 1: (D)ry, (T)est, (U)pload"
|
||||||
|
echo " optional arg 2: fast"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -90,10 +92,13 @@ load_env || {
|
||||||
load_env
|
load_env
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# grab licenses
|
||||||
|
scripts/genlic.sh copyparty/res/COPYING.txt
|
||||||
|
|
||||||
# remove type hints to support python < 3.9
|
# remove type hints to support python < 3.9
|
||||||
rm -rf build/pypi
|
rm -rf build/pypi
|
||||||
mkdir -p build/pypi
|
mkdir -p build/pypi
|
||||||
cp -pR setup.py README.md LICENSE copyparty tests bin scripts/strip_hints build/pypi/
|
cp -pR setup.py README.md LICENSE copyparty contrib bin scripts/strip_hints build/pypi/
|
||||||
tar -c docs/lics.txt scripts/genlic.sh build/*.txt | tar -xC build/pypi/
|
tar -c docs/lics.txt scripts/genlic.sh build/*.txt | tar -xC build/pypi/
|
||||||
cd build/pypi
|
cd build/pypi
|
||||||
f=../strip-hints-0.1.10.tar.gz
|
f=../strip-hints-0.1.10.tar.gz
|
||||||
|
@ -103,6 +108,34 @@ f=../strip-hints-0.1.10.tar.gz
|
||||||
tar --strip-components=2 -xf $f strip-hints-0.1.10/src/strip_hints
|
tar --strip-components=2 -xf $f strip-hints-0.1.10/src/strip_hints
|
||||||
python3 -c 'from strip_hints.a import uh; uh("copyparty")'
|
python3 -c 'from strip_hints.a import uh; uh("copyparty")'
|
||||||
|
|
||||||
|
# resolve symlinks
|
||||||
|
find -type l |
|
||||||
|
while IFS= read -r f1; do (
|
||||||
|
cd "${f1%/*}"
|
||||||
|
f1="./${f1##*/}"
|
||||||
|
f2="$(readlink "$f1")"
|
||||||
|
[ -e "$f2" ] || f2="../$f2"
|
||||||
|
[ -e "$f2" ] || {
|
||||||
|
echo could not resolve "$f1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
rm "$f1"
|
||||||
|
cp -p "$f2" "$f1"
|
||||||
|
); done
|
||||||
|
|
||||||
|
# resolve symlinks on windows
|
||||||
|
[ "$OSTYPE" = msys ] &&
|
||||||
|
(cd ../..; git ls-files -s | awk '/^120000/{print$4}') |
|
||||||
|
while IFS= read -r x; do
|
||||||
|
[ $(wc -l <"$x") -gt 1 ] && continue
|
||||||
|
(cd "${x%/*}"; cp -p "../$(cat "${x##*/}")" ${x##*/})
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -rf contrib
|
||||||
|
[ $fast ] && sed -ri s/5730/10/ copyparty/web/Makefile
|
||||||
|
(cd copyparty/web && make -j$(nproc) && rm Makefile)
|
||||||
|
|
||||||
|
# build
|
||||||
./setup.py clean2
|
./setup.py clean2
|
||||||
./setup.py sdist bdist_wheel --universal
|
./setup.py sdist bdist_wheel --universal
|
||||||
|
|
||||||
|
|
11
setup.py
11
setup.py
|
@ -29,12 +29,6 @@ with open(here + "/README.md", "rb") as f:
|
||||||
txt = f.read().decode("utf-8")
|
txt = f.read().decode("utf-8")
|
||||||
long_description = txt
|
long_description = txt
|
||||||
|
|
||||||
try:
|
|
||||||
cmd = "bash scripts/genlic.sh copyparty/res/COPYING.txt"
|
|
||||||
sp.Popen(cmd.split()).wait()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
about = {}
|
about = {}
|
||||||
if not VERSION:
|
if not VERSION:
|
||||||
with open(os.path.join(here, NAME, "__version__.py"), "rb") as f:
|
with open(os.path.join(here, NAME, "__version__.py"), "rb") as f:
|
||||||
|
@ -95,8 +89,6 @@ args = {
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 2",
|
|
||||||
"Programming Language :: Python :: 2.7",
|
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.3",
|
"Programming Language :: Python :: 3.3",
|
||||||
"Programming Language :: Python :: 3.4",
|
"Programming Language :: Python :: 3.4",
|
||||||
|
@ -146,4 +138,7 @@ args = {
|
||||||
"cmdclass": {"clean2": clean2},
|
"cmdclass": {"clean2": clean2},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
args["install_requires"].append("ipaddress")
|
||||||
|
|
||||||
setup(**args)
|
setup(**args)
|
||||||
|
|
Loading…
Reference in a new issue