Skip to content

Commit

Permalink
Replace setuptools with Poetry (#112)
Browse files Browse the repository at this point in the history
* Add pyproject.toml and support for Poetry

* Replace setuptools with Poetry

---------

Co-authored-by: amietn <amietn@foobar>
  • Loading branch information
amietn and amietn authored May 1, 2023
1 parent fa7aa8c commit 5de3a14
Show file tree
Hide file tree
Showing 7 changed files with 378 additions and 85 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,21 @@ The above contact sheets were generated from a movie called "Big Buck Bunny".

### PyPi

`vcsi` can be installed from PyPi:

```
$ pip install vcsi
```

### Poetry

First install [Poetry](https://python-poetry.org/docs/#installation), then run:

```
$ poetry build
$ pip install dist/*.whl
```

### Distribution packages

vcsi is currently packaged for the following systems:
Expand All @@ -57,9 +68,10 @@ Your system is not listed?

```
$ apt-get install ffmpeg
$ python setup.py install
```

Then use the Poetry installation method above.

Running Windows? See the note below.


Expand Down Expand Up @@ -346,3 +358,12 @@ Resolution: {{sample_width}}x{{sample_height}}
| audio_sample_rate | Audio sample rate (Hz) | 44100 |
| audio_bit_rate | Audio bit rate | 192000 |
| frame_rate | Frame rate (fps) | 23.974 |


## Testing

To run the test suite, run:

```
poetry run pytest
```
7 changes: 2 additions & 5 deletions make_pypi_release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env bash

rm -rf vcsi.egg-info
rm -rf build
rm -rf dist
python3 setup.py sdist bdist_wheel
twine upload dist/*

poetry build
poetry publish
328 changes: 328 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tool.poetry]
name = "vcsi"
version = "7.0.14"
description = "Create video contact sheets, thumbnails, screenshots"
authors = ["Nils Amiet <amietn@foobar.tld>"]
license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
pillow = "^9.5.0"
numpy = "^1.24.3"
jinja2 = "^3.1.2"
texttable = "^1.6.7"
parsedatetime = "^2.6"

[tool.poetry.group.dev.dependencies]
pytest = "^7.3.1"

[tool.poetry.scripts]
vcsi = "vcsi.vcsi:main"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

73 changes: 0 additions & 73 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion vcsi/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.13
7.0.14

0 comments on commit 5de3a14

Please sign in to comment.