diff --git a/README.rst b/README.rst index 21bc319..cea512e 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,8 @@ Personal Builder for the Iosevka Font ===================================== +|build status| + This repo has a GitHub Workflow which can build Arch Linux packages for the incredible Iosevka_ font. @@ -14,23 +16,38 @@ any system. How to Use ---------- -If you want to have GitHub build your custom configuration: +If you want to have GitHub build your custom configuration, +fork this repo on GitHub, then: + +- get a local copy + +.. code:: console + + $ git clone + $ cd archbuilder_iosevka -#. Fork this repo on GitHub -#. Clone your fork locally -#. Edit ``vars.yml`` to your liking -#. Activate a Python virtual environment to match ``requirements.txt`` -#. Regenerate ``buildpkg.yml`` -#. Commit the changes -#. Create and push a tag starting with ``r`` +- configure your font .. code:: console - $ git clone - $ cd archbuilder_iosevka - $ $EDITOR vars.yml - $ # activate a new virtual environment (see next section) - $ ./mk/buildpkg.yml.sh + $ $EDITOR vars.yml + +- activate a `Python Virtual Environment`_ matching ``requirements.txt``, e.g.: + +.. code:: console + + $ python3 -m venv venv + $ . ./venv/bin/activate + $ python -m pip install -r requirements.txt + +- generate your new workflow + +.. code:: console + + $ ./mk/buildpkg.yml.sh + +- tag your changes as a release (start tag with 'r'), and push + $ git commit vars.yml .github/workflows/buildpkg.yml -m "much better now" $ git tag r123-awesome-build-label $ git push --tags @@ -41,33 +58,62 @@ find the built font in your ``Releases``. Python Virtual Environment -------------------------- -We use a small Python environment to render the Workflow (``buildpkg.yml``) +We use two small Python tools to render the Workflow (``buildpkg.yml``) from an included template, using the data in ``vars.yml``. You can create and activate a virtual environment in your favorite way, as long as it has the packages listed in ``requirements.txt``. -Two possible methods are described below. +Some methods are described below. -Using Python's ``venv`` Directly -++++++++++++++++++++++++++++++++ +Python's ``venv`` Directly +++++++++++++++++++++++++++ .. code:: console - $ python3 -m venv venv - $ . ./venv/bin/activate - $ python -m pip install -r requirements.txt + $ python3 -m venv venv + $ . ./venv/bin/activate + $ python -m pip install -r requirements.txt -Using zpy -+++++++++ +zpy ++++ -zpy_ is a set of helpers for managing Python venvs and packages, with Zsh and pip-tools_. +zpy_ is a toolset for managing Python venvs and packages, with Zsh and pip-tools_. + +Either create and activate a venv matching ``requirements.txt``: + +.. code:: console + + % envin + +or install the necessary tools (wheezy.template, yamlpath) into their own isolated venvs, +adding links to the relevant scripts (``wheezy.template``, ``yaml-get``) to your ``PATH``: .. code:: console - % envin + $ pipz install --cmd wheezy.template,yaml-get wheezy.template yamlpath + +pipenv +++++++ + +.. code:: console + + $ pipenv shell + $ pipenv install + +pipx +++++ + +.. code:: console + + $ pipx install wheezy.template yamlpath + .. _ttf-iosevka-term-custom-git: https://aur.archlinux.org/packages/ttf-iosevka-term-custom-git .. _Iosevka: https://github.com/be5invis/Iosevka/ .. _zpy: https://github.com/andydecleyre/zpy .. _pip-tools: https://github.com/jazzband/pip-tools + +.. |build status| image:: https://github.com/AndydeCleyre/archbuilder_iosevka/workflows/Build%20and%20upload%20Arch%20Linux%20packages/badge.svg + :alt: Build Status + :target: https://github.com/AndydeCleyre/archbuilder_iosevka/actions diff --git a/mk/pkgbuilds.sh b/mk/pkgbuilds.sh index 6f36730..f76f4cb 100755 --- a/mk/pkgbuilds.sh +++ b/mk/pkgbuilds.sh @@ -5,7 +5,7 @@ gitroot="$(git rev-parse --show-toplevel)" "${gitroot}"/mk/private-build-plans.toml.sh pbp_sha256="$(sha256sum "${gitroot}"/private-build-plans.toml | cut -d' ' -f 1)" -yaml-get -p 'spacings[. =~ //]' "${gitroot}"/vars.yml | while read spacing; do +yaml-get -p 'spacings.*' "${gitroot}"/vars.yml | while read spacing; do folder="${gitroot}/pkgs/ttf-iosevka-${spacing}${spacing:+-}custom-git" diff --git a/requirements.in b/requirements.in index 87f1e8d..b1b915d 100644 --- a/requirements.in +++ b/requirements.in @@ -1,2 +1,2 @@ -yamlpath +yamlpath>=3.4.0 wheezy.template diff --git a/requirements.txt b/requirements.txt index c84b71b..c874d74 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ ruamel.yaml.clib==0.2.2 # via ruamel.yaml ruamel.yaml==0.16.12 # via yamlpath wheezy.template==3.0.1 # via -r requirements.in -yamlpath==3.3.0 # via -r requirements.in +yamlpath==3.4.0 # via -r requirements.in diff --git a/vars.yml b/vars.yml index c14d9f6..bfa1722 100644 --- a/vars.yml +++ b/vars.yml @@ -10,10 +10,12 @@ spacings: - force-monospace # term with no wide glyphs - fixed # force-monospace with no ligatures charvars: + digit-form: lining turn-v: curly capital-b: more-asymmetric capital-d: more-rounded capital-g: toothless + capital-i: serifless capital-j: serifless capital-k: curly capital-m: hanging @@ -23,13 +25,13 @@ charvars: a: doublestorey-tailed b: toothless-corner d: tailed - f: tailed + f: flat-hook-tailed g: opendoublestorey h: straight i: hooky - j: straight + j: serifless k: curly - l: tailed + l: flat-tailed m: shortleg n: earless-corner-tailed p: eared