use poetry

This commit is contained in:
Vincent Poulailleau 2019-12-02 18:24:23 +01:00
parent 2a598c54e0
commit 64660b96b6
2 changed files with 11 additions and 22 deletions

View File

@ -74,25 +74,11 @@ pip install padpo
3. Install dependencies
```bash
pip install -r requirements.txt
poetry install
```
4. Get grammalecte (normally this is done automatically at first usage)
```bash
pip install wheel
wget https://grammalecte.net/grammalecte/zip/Grammalecte-fr-v1.5.0.zip
unzip Grammalecte-fr-v1.5.0.zip -d Grammalecte-fr-v1.5.0
cd Grammalecte-fr-v1.5.0
pip install .
```
Note: this uses `poetry` that you can get here: https://poetry.eustace.io/docs/
## Update on PyPI
* git pull
* change version in `pyproject.toml` and in `padpo.__init__`
* clean
* `rm -rf build/ dist/ eggs/`
* TODO make a script for this (and better clean)
* `poetry build`
* `poetry publish`
`./deliver.sh`

View File

@ -1,9 +1,10 @@
#!/bin/bash
# configuration management
git pull
cat padpo/__init__.py | grep version
cat setup.py | grep version
echo "ready ?"
cat pyproject.toml | grep version
echo "ready?"
read BOOL
source venv/bin/activate
@ -21,8 +22,10 @@ rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
# tests
tox
echo "ready to publish to PyPI?"
read BOOL
# package creation
python setup.py sdist
python setup.py bdist_wheel
twine upload dist/*
poetry publish