mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
fix testrunner + packaging
This commit is contained in:
parent
89ba12065c
commit
8ef4a0aa71
0
copyparty/web/a/__init__.py
Normal file
0
copyparty/web/a/__init__.py
Normal file
0
copyparty/web/dd/__init__.py
Normal file
0
copyparty/web/dd/__init__.py
Normal file
0
copyparty/web/deps/__init__.py
Normal file
0
copyparty/web/deps/__init__.py
Normal file
|
@ -1,5 +0,0 @@
|
|||
cd %~dp0\..
|
||||
python setup.py clean2
|
||||
python setup.py rstconv
|
||||
python setup.py sdist bdist_wheel --universal
|
||||
REM python setup.py sdist upload -r pypi
|
|
@ -55,14 +55,6 @@ EOF
|
|||
# set pypi password
|
||||
chmod 600 ~/.pypirc
|
||||
sed -ri 's/qwer/username/;s/asdf/password/' ~/.pypirc
|
||||
|
||||
# if PY2: create build env
|
||||
cd ~/dev/copyparty && virtualenv buildenv
|
||||
(. buildenv/bin/activate && pip install twine)
|
||||
|
||||
# if PY3: create build env
|
||||
cd ~/dev/copyparty && python3 -m venv buildenv
|
||||
(. buildenv/bin/activate && pip install twine wheel)
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,15 +74,27 @@ function have() {
|
|||
python -c "import $1; $1; $1.__version__"
|
||||
}
|
||||
|
||||
function load_env() {
|
||||
. buildenv/bin/activate
|
||||
have setuptools
|
||||
have wheel
|
||||
have twine
|
||||
}
|
||||
|
||||
load_env || {
|
||||
echo creating buildenv
|
||||
deactivate || true
|
||||
rm -rf buildenv
|
||||
python3 -m venv buildenv
|
||||
(. buildenv/bin/activate && pip install twine wheel)
|
||||
load_env
|
||||
}
|
||||
|
||||
# remove type hints to support python < 3.9
|
||||
rm -rf build/pypi
|
||||
mkdir -p build/pypi
|
||||
cp -pR setup.py README.md LICENSE copyparty tests bin scripts/strip_hints build/pypi/
|
||||
tar -c docs/lics.txt scripts/genlic.sh build/*.txt | tar -xC build/pypi/
|
||||
cd build/pypi
|
||||
f=../strip-hints-0.1.10.tar.gz
|
||||
[ -e $f ] ||
|
||||
|
|
|
@ -5,6 +5,24 @@ rm -rf unt
|
|||
mkdir -p unt/srv
|
||||
cp -pR copyparty tests unt/
|
||||
cd unt
|
||||
|
||||
# resolve symlinks
|
||||
set +x
|
||||
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
|
||||
set -x
|
||||
|
||||
python3 ../scripts/strip_hints/a.py
|
||||
|
||||
pids=()
|
||||
|
@ -12,7 +30,7 @@ for py in python{2,3}; do
|
|||
[ ${1:0:6} = python ] && [ $1 != $py ] && continue
|
||||
|
||||
PYTHONPATH=
|
||||
[ $py = python2 ] && PYTHONPATH=../scripts/py2
|
||||
[ $py = python2 ] && PYTHONPATH=../scripts/py2:../sfx/py37
|
||||
export PYTHONPATH
|
||||
|
||||
nice $py -m unittest discover -s tests >/dev/null &
|
||||
|
|
|
@ -19,8 +19,8 @@ copyparty/httpconn.py,
|
|||
copyparty/httpsrv.py,
|
||||
copyparty/ico.py,
|
||||
copyparty/mdns.py,
|
||||
copyparty/multicast.py,
|
||||
copyparty/mtag.py,
|
||||
copyparty/multicast.py,
|
||||
copyparty/res,
|
||||
copyparty/res/COPYING.txt,
|
||||
copyparty/res/insecure.pem,
|
||||
|
@ -59,6 +59,7 @@ copyparty/vend/asynchat.py,
|
|||
copyparty/vend/asyncore.py,
|
||||
copyparty/web,
|
||||
copyparty/web/a,
|
||||
copyparty/web/a/__init__.py,
|
||||
copyparty/web/a/partyfuse.py,
|
||||
copyparty/web/a/up2k.py,
|
||||
copyparty/web/a/webdav-cfg.bat,
|
||||
|
@ -67,21 +68,23 @@ copyparty/web/browser.css,
|
|||
copyparty/web/browser.html,
|
||||
copyparty/web/browser.js,
|
||||
copyparty/web/browser2.html,
|
||||
copyparty/web/copyparty.gif,
|
||||
copyparty/web/cf.html,
|
||||
copyparty/web/copyparty.gif,
|
||||
copyparty/web/dd,
|
||||
copyparty/web/dd/2.png,
|
||||
copyparty/web/dd/3.png,
|
||||
copyparty/web/dd/4.png,
|
||||
copyparty/web/dd/5.png,
|
||||
copyparty/web/dd/__init__.py,
|
||||
copyparty/web/deps,
|
||||
copyparty/web/deps/__init__.py,
|
||||
copyparty/web/deps/easymde.css,
|
||||
copyparty/web/deps/easymde.js,
|
||||
copyparty/web/deps/marked.js,
|
||||
copyparty/web/deps/mini-fa.css,
|
||||
copyparty/web/deps/mini-fa.woff,
|
||||
copyparty/web/deps/prism.js,
|
||||
copyparty/web/deps/prism.css,
|
||||
copyparty/web/deps/prism.js,
|
||||
copyparty/web/deps/prismd.css,
|
||||
copyparty/web/deps/scp.woff2,
|
||||
copyparty/web/deps/sha512.ac.js,
|
||||
|
|
15
setup.py
15
setup.py
|
@ -6,7 +6,7 @@ import os
|
|||
import sys
|
||||
import subprocess as sp
|
||||
from shutil import rmtree
|
||||
from setuptools import setup, Command, find_packages
|
||||
from setuptools import setup, Command
|
||||
|
||||
|
||||
NAME = "copyparty"
|
||||
|
@ -120,7 +120,18 @@ args = {
|
|||
],
|
||||
"include_package_data": True,
|
||||
"data_files": data_files,
|
||||
"packages": find_packages(),
|
||||
"packages": [
|
||||
"copyparty",
|
||||
"copyparty.bos",
|
||||
"copyparty.res",
|
||||
"copyparty.stolen",
|
||||
"copyparty.stolen.dnslib",
|
||||
"copyparty.stolen.ifaddr",
|
||||
"copyparty.web",
|
||||
"copyparty.web.a",
|
||||
"copyparty.web.dd",
|
||||
"copyparty.web.deps",
|
||||
],
|
||||
"install_requires": ["jinja2"],
|
||||
"extras_require": {
|
||||
"thumbnails": ["Pillow"],
|
||||
|
|
|
@ -90,7 +90,8 @@ class TestDXML(unittest.TestCase):
|
|||
root = mkenod("a")
|
||||
root.insert(0, parse_xml(txt))
|
||||
prop = root.find(r"./{DAV:}propertyupdate/{DAV:}set/{DAV:}prop")
|
||||
assert prop
|
||||
assert prop is not None
|
||||
assert len(prop)
|
||||
for el in prop:
|
||||
el.clear()
|
||||
|
||||
|
|
|
@ -98,19 +98,19 @@ class Cfg(Namespace):
|
|||
def __init__(self, a=None, v=None, c=None):
|
||||
ka = {}
|
||||
|
||||
ex = "e2d e2ds e2dsa e2t e2ts e2tsr e2v e2vu e2vp no_dav daw dav_inf dav_mac xdev xvol ed emp force_js ihead magic no_acode no_athumb no_del no_logues no_mv no_readme no_robots no_scandir no_thumb no_vthumb no_zip nid nih nw"
|
||||
ex = "daw dav_inf dav_mac e2d e2ds e2dsa e2t e2ts e2tsr e2v e2vu e2vp ed emp force_js ihead magic nid nih no_acode no_athumb no_dav no_del no_dupe no_logues no_mv no_readme no_robots no_scandir no_thumb no_vthumb no_zip nw xdev xlink xvol"
|
||||
ka.update(**{k: False for k in ex.split()})
|
||||
|
||||
ex = "no_rescan no_sendfile no_voldump plain_ip dotpart"
|
||||
ex = "dotpart no_rescan no_sendfile no_voldump plain_ip"
|
||||
ka.update(**{k: True for k in ex.split()})
|
||||
|
||||
ex = "css_browser hist js_browser no_hash no_idx no_forget"
|
||||
ex = "css_browser hist js_browser no_forget no_hash no_idx"
|
||||
ka.update(**{k: None for k in ex.split()})
|
||||
|
||||
ex = "re_maxage rproxy rsp_slp s_wr_slp theme themes turbo df loris"
|
||||
ex = "df loris re_maxage rproxy rsp_slp s_wr_slp theme themes turbo"
|
||||
ka.update(**{k: 0 for k in ex.split()})
|
||||
|
||||
ex = "doctitle favico html_head mth textfiles log_fk"
|
||||
ex = "doctitle favico html_head log_fk mth textfiles"
|
||||
ka.update(**{k: "" for k in ex.split()})
|
||||
|
||||
super(Cfg, self).__init__(
|
||||
|
|
Loading…
Reference in a new issue