- workplace setup
- makefile targets
- release process
Development can be done with a pure text editor and a terminal session.
Use python and mypy extensions for Visual Studio Code (from Microsoft).
- Control-P: "ext list"
- look for "Python", "Pylance" (style checker), "Mypy Type Checker" (type checker)
- optional "Makefile Tools"
- and install the "CMake" tools
- Control-P: "ext install ms-python.mypy-type-checker"
- this one pulls the latest mypy from the visualstudio marketplace
- https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker
The make targets are defaulting to tests with python3.6 but the mypy plugin
for vscode requires atleast python3.8. All current Linux distros provide an
additional package with a higher version number, e.g "zypper install python311".
Be sure to also install "python311-mypy" or compile "pip3 install mypy".
Implant the paths to those tools into the workspace settings = .vscode/settings.json
{
"mypy-type-checker.reportingScope": "workspace",
"mypy-type-checker.interpreter": [
"/usr/bin/python3.11"
],
"mypy-type-checker.path": [
"mypy-3.11"
],
"mypy-type-checker.args": [
"--strict",
"--show-error-codes",
"--show-error-context",
"--no-warn-unused-ignores",
"--ignore-missing-imports",
"--exclude=build"
],
"python.defaultInterpreterPath": "python3"
}
The python files at the toplevel are not checked in vscode. I dont know why (yet).
Common distro packages are:
zypper install python3 python3-pip# atleast python3.6zypper install python3-wheel python3-twinezypper install python3-coverage python3-unittest-xml-reportingzypper install python3-mypy python3-mypy_extensions python3-typing_extensionszypper install python3-autopep8zypper install libsdl2-dev# includes gcc and make toolszypper install cmake# should be installed with libsdl2 alreadyzypper install clang# only for release checks with clang-formatzypper install ninja# only for release checks wiht alternative cmake buildzypper install automake# only for release checks of obsolete automake builds
For ubuntu you can check the latest Github workflows under
grep apt-get .github/workflows/*.yml
make typemake stylemake format# if clang-format available
make cmake# does not compile manpages or testbins or downloads testzipsmake build# compiling the defaults for a release (autodetects SDL)make ninja# should be faster that makefile-build frommake buildmake nmake# another cmake build variantmake docs# needs to run seperately sometimesmake am# if you want to run the obsolete automake build again
and the variants
make staticmake fortify
Note that zziptests require some test-zips that are downloaded from the internet.
If you do not have direct access then run make downloads and carry the tmp.download
directory to the development host inside.
make check# running zziptests.pymake tests# running testbuilds.pymake installandmake uninstallsmake testmanpages
make versionmake build- consider running alternative cmake variants like ninja and nmake
Note that the testbuilds.py are currently comparing make am builds with cmake ones
Remember that zziplib is a base package in many Linux distros. It is helpful to check if they have some patch that should be integrated. Here are some links:
- https://launchpad.net/ubuntu/+source/zziplib
- https://software.opensuse.org/package/zziplib
- https://archlinux.org/packages/extra/x86_64/zziplib/
- https://git.almalinux.org/rpms/zziplib
make type# python mypymake style# python stylemake format# cxx stylemake missing32# checks for missing functions from ZZIP_LARGEFILE_RENAMEmake fortify# build with address-sanitizermake checkmake version# aka 'make nextversion' !!!make installmake uninstallsmake ins# pip for zzipdoctoolmake uns# pip for zzipdoctoolmake bui# build for pip twinemake build# default buildmake docs# includesmake mansmake auto# update automake variantmake am# remake with obsolete autotoolsmake ninja# if installed. Also considermake nmakemake testbuilds# run some different build variants automaticallymake new check coverage- update README.md with the result from coverage
- update ChangeLog from latest git log
git push# if necessary- wait for github workflows to be okay
- prepare a tmp.changes.txt
make tag- and
git tag -F tmp.changes.txt v1.xto the version in zziplib.spec
- and
git push --tagsmake bui- and run twine as shown to upload to pypi.org
- update the short description on github
- consider making a github release with the latest news
Currently there is a problem with the testzip downloads during "make check" on Github
You have exceeded a secondary rate limit. Please wait a few minutes before you try again.
- there is a longer wishlist in
TODO- it should be cleaned up - remove usage of format(**locals()) as all python3 have f-strings
- bins/unzzip*.c use internal headers which external programs can't