diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 57 |
1 files changed, 39 insertions, 18 deletions
@@ -4,45 +4,66 @@ This is the repository of Python incarnation of [Hydrilla](https://hydrillabugs. ## Dependencies +### Runtime + +* Python3 +* [hydrilla.builder](https://git.koszko.org/hydrilla-builder/) * flask -* pytest (for running tests) +* click +* jsonschema + +### Build + +* setuptools +* wheel +* setuptools_scm +* babel -Additionally, Hydrilla requires Python 3. +### Test + +* pytest ## Building -We're supplying debian packaging. To generate the necessary `debian.tar.gz` and `orig.tar.gz` files, run: +We're using setuptools. You can build a wheel under `dist/` with ``` shell -python3 setup.py tarballs +python3 -m build ``` +Optionally, add a `--no-isolation` option to the second command to have it use system packages where possible instead of downloading all dependencies from PyPI. -This will generate appropriate `debian.tar.gz` and `orig.tar.gz` in the parent of the project directory. +*TODO: describe freedom considerations with PyPI...* -*TODO: describe debian procedure...* +The generated .whl file can then be used to install Hydrilla either globally or in the current Python virtualenv: +```shell +python3 -m pip install dist/put_the_name_of_generated_file_here.whl +``` -We're using setuptools. This means you can also do something like: +## Testing +For tests to pass you need compiled message catalogs to be present. If you've performed the build at least once, they're already there. Otherwise, you need to run `./setup.py compile_catalog`. Then you can run the actual tests: ``` shell -python3 setup.py install +python3 -m pytest ``` -*TODO: describe setuptools considerations and mention avoiding pip...* +## Debian package +*TODO* ## Running -Hydrilla can be run from source, without prior installation, provided that its dependencies are present on the system. For this to work, you should first generate GNU Gettext `.mo` files. This is most easily achieved using our custom `setup.py` command: -``` shell -python3 setup.py msgfmt -``` -A simple session can then be started with: -``` shell -python3 setup.py run +### Hydrilla command + +Hydrilla includes a `hydrilla` command that can be used to quickly and easily spawn a local instance, e.g.: ``` +hydrilla -m /path/to/where/package/files/to/serve/are/stored -p 10112 +``` +This will cause the resources from provided path to be served at [http://127.0.0.1:10112/](http://127.0.0.1:10112/). + +The actual packages to serve are made using [Hydrilla builder](https://git.koszko.org/hydrilla-builder/). *TODO...* ## Copying -Hydrilla is entirely available under the GNU Affero General Public License version 3 or later. Some files might also give you broader permissions, see comments inside them. +Hydrilla is Copyright (C) 2021-2022 Wojtek Kosior and contributors, entirely available under the GNU Affero General Public License version 3 or later. Some files might also give you broader permissions, see comments inside them. *I, Wojtek Kosior, thereby promise not to sue for violation of this project's license. Although I request that you do not make use this code in a proprietary program, I am not going to enforce this in court.* @@ -50,4 +71,4 @@ Hydrilla is entirely available under the GNU Affero General Public License versi Please visit our Redmine instance at https://hydrillabugs.koszko.org. -You can also write an email to koszko@koszko.org.
\ No newline at end of file +You can also write an email to koszko@koszko.org. |