<commit_before>.. _dev.sdist:

================================
Publishing a new version of Lino
================================

check sdist_dir in your invoke.py

$ pp inv sdist 
$ go book
$ inv bd pd  <commit_msg>#2347 : Update docs page "Publishing a new version of Lino"<commit_after>.. _dev.sdist:

================================
Publishing a new version of Lino
================================


Generate Lino packages
======================
We can use atelier to generate for us the installable packages for lino, but the need the be sure that sdist_dir is
correctly set in your invoke.py. It should be some value like ::

        sdist_dir = '/home/khchine5/PycharmProjects/lino/book/docs/dl/{prj}'

Atelier will replace the {prj} variable with the name of the current projet.

To generate lino packages for all lino projects, we use the command ::

        $ pp inv sdist

Test Lino packages
======================
Lino use his own repository to host the generated packages for testing before publishing officially on the Pypi. To
publish the docs and Lino packages to use the usual commands ::

        $ go book
        $ inv bd pd

Once it is done, we can use https://lino-framework.org/dl/ as our main repository to install Lino using the following
 command with a fresh virtualenv ::

        pip install --index-url http://lino-framework.org/dl lino --trusted-host lino-framework.org --extra-index-url
        https://pypi.org/simple

{'fraction_non_alphanumeric': 0.1767537826685007, 'fraction_numerical': 0.0034387895460797797, 'mean_word_length': 3.786184210526316, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6028843', 'n_tokens_mistral': 408, 'n_tokens_neox': 386, 'n_words': 174}