Skip to content

Commit 5ce994c

Browse files
committed
[build] Add pyproject.toml and update setup.cfg.
1 parent 0f80f4c commit 5ce994c

7 files changed

Lines changed: 79 additions & 114 deletions

File tree

MANIFEST.in

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
include *.md
2-
include *.rst
3-
include LICENSE*
1+
recursive-exclude .github *
2+
recursive-exclude dist *
3+
recursive-exclude manual *
4+
exclude manual/requirements.txt
5+
exclude *
6+
include README.md
7+
include LICENSE
8+
include pyproject.toml
9+
include setup.cfg

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Video Scene Cut Detection and Analysis Tool
88

99
----------------------------------------------------------
1010

11-
### Latest Release: v0.6-dev3 (March 11, 2022)
11+
### Latest Release: v0.6 (TBD)
1212

1313
**Website**: http://www.scenedetect.com
1414

@@ -22,7 +22,7 @@ Video Scene Cut Detection and Analysis Tool
2222

2323
**Quick Install**: To install PySceneDetect via `pip` with all dependencies:
2424

25-
pip install scenedetect[opencv] --pre
25+
pip install scenedetect[opencv]
2626

2727
For servers, you can use the headless (non-GUI) version of OpenCV by installing `scenedetect[opencv-headless]`. To enable video splitting support, you will also need to have `mkvmerge` or `ffmpeg` installed - see the documentation on [Video Splitting Support](https://scenedetect.com/en/v0.6/examples/video-splitting/) for details.
2828

docs/changelog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ Both the Windows installer and portable distributions now include signed executa
1818

1919
**Overview:**
2020

21-
* Video decoding now runs in parallel with scene detection, resulting in significant performance improvements
22-
* Adds [support for configuration file](http://scenedetect.com/projects/Manual/en/v0.6/cli/config_file.html) via command line or in user settings folder
23-
* Adds support for multiple video backends, PyAV is now supported in addition to OpenCV
21+
* Major performance improvements on multicore systems
22+
* [Configuration file support](http://scenedetect.com/projects/Manual/en/v0.6/cli/config_file.html) via command line option or user settings folder
23+
* Support for multiple video backends, PyAV is now supported in addition to OpenCV
2424
* Breaking API changes to `VideoManager` (replaced with `VideoStream`), `StatsManager`, and `save_images()`
2525
* See the [Migration Guide](https://manual.scenedetect.com/en/v0.6/api/migration_guide.html) for details on how to update from v0.5.x
26-
* A backwards compatibility layer has been added to prevent most applications from breaking - this layer will be removed in a future release
26+
* A backwards compatibility layer has been added to prevent most applications from breaking, will be removed in a future release
2727
* Support for Python 2.7 has been dropped, minimum supported Python version is 3.6
2828
* Support for OpenCV 2.x has been dropped, minimum OpenCV version is 3.x
2929
* Windows binaries are now signed, thanks [SignPath.io](https://signpath.io/) (certificate by [SignPath Foundation](https://signpath.org/))

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"

scenedetect.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

setup.cfg

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,63 @@
11

22
[metadata]
3-
description_file = dist/package-info.rst
3+
name = scenedetect
4+
version = attr: scenedetect.__version__
5+
license = BSD 3-Clause License
6+
author = Brandon Castellano
7+
author_email = brandon248@gmail.com
8+
description = Video scene cut/shot detection program and Python library.
9+
long_description = file: dist/package-info.rst
10+
long_description_content_type = text/x-rst
11+
url = https://scenedetect.com/
12+
project_urls =
13+
Homepage = https://scenedetect.com/
14+
Repository = https://github.com/Breakthrough/PySceneDetect
15+
Documentation = https://manual.scenedetect.com/
16+
Bug Tracker = https://github.com/Breakthrough/PySceneDetect/issues
17+
classifiers =
18+
Development Status :: 5 - Production/Stable
19+
Environment :: Console
20+
Environment :: Console :: Curses
21+
Intended Audience :: Developers
22+
Intended Audience :: End Users/Desktop
23+
Intended Audience :: System Administrators
24+
License :: OSI Approved :: MIT License
25+
Operating System :: OS Independent
26+
Programming Language :: Python :: 3
27+
Programming Language :: Python :: 3.6
28+
Programming Language :: Python :: 3.7
29+
Programming Language :: Python :: 3.8
30+
Programming Language :: Python :: 3.9
31+
Programming Language :: Python :: 3.10
32+
Topic :: Multimedia :: Video
33+
Topic :: Multimedia :: Video :: Conversion
34+
Topic :: Multimedia :: Video :: Non-Linear Editor
35+
Topic :: Utilities
36+
keywords = video computer-vision analysis
437

5-
[bdist_wheel]
6-
universal = 0
38+
[options]
39+
install_requires =
40+
Click
41+
numpy
42+
tqdm
43+
appdirs
44+
45+
packages =
46+
scenedetect
47+
scenedetect.backends
48+
scenedetect.cli
49+
scenedetect.detectors
50+
scenedetect.thirdparty
51+
python_requires = >=3.6
52+
53+
[options.extras_require]
54+
opencv = opencv-python
55+
opencv-headless = opencv-python-headless
56+
pyav = av
57+
58+
[options.entry_points]
59+
console_scripts =
60+
scenedetect = scenedetect.__main__:main
761

862
[aliases]
963
test = pytest

setup.py

Lines changed: 4 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -12,90 +12,12 @@
1212
# included LICENSE file, or visit one of the above pages for details.
1313
#
1414

15-
""" PySceneDetect setup.py
15+
""" PySceneDetect setup.py """
1616

17-
To install PySceneDetect:
18-
19-
python setup.py install
20-
21-
To run the PySceneDetect unit tests (requires testvideo.mp4, link below):
22-
23-
python setup.py test
24-
25-
You can obtain the required testvideo.mp4 from the PySceneDetect [resources
26-
branch](https://github.com/Breakthrough/PySceneDetect/tree/resources) on Github,
27-
or the following URL:
28-
29-
https://raw.githubusercontent.com/Breakthrough/PySceneDetect/resources/tests/testvideo.mp4
30-
31-
"""
17+
# TODO: Remove this. https://packaging.python.org/en/latest/tutorials/packaging-projects/
3218

3319
from setuptools import setup
34-
from typing import Dict, List
35-
36-
def get_requires() -> List[str]:
37-
""" Get Requires: Returns a list of required packages. """
38-
return [
39-
'Click',
40-
'numpy',
41-
'tqdm',
42-
'appdirs'
43-
]
44-
45-
def get_extra_requires() -> Dict[str, List[str]]:
46-
""" Get Extra Requires: Returns a list of extra/optional packages. """
47-
return {
48-
'opencv': ['opencv-python'],
49-
'opencv-headless': ['opencv-python-headless'],
50-
}
51-
52-
5320
setup(
54-
name='scenedetect',
55-
version='0.6-rc0',
56-
description='Video scene cut/shot detection program and Python library.',
57-
long_description=open('dist/package-info.rst').read(),
58-
author='Brandon Castellano',
59-
author_email='brandon248@gmail.com',
60-
url='https://github.com/Breakthrough/PySceneDetect',
61-
license="BSD 3-Clause",
62-
keywords="video computer-vision analysis",
63-
install_requires=get_requires(),
64-
extras_require=get_extra_requires(),
65-
setup_requires=['pytest-runner'],
66-
tests_require=['pytest'],
67-
packages=['scenedetect',
68-
'scenedetect.backends',
69-
'scenedetect.cli',
70-
'scenedetect.detectors',
71-
'scenedetect.thirdparty'],
72-
package_data={'': ['../LICENSE', '../USAGE.md', '../package-info.rst']},
73-
#include_package_data = True, # Must leave this to the default.
74-
#test_suite="unitest.py", # Auto-detects tests from setup.cfg
75-
entry_points={"console_scripts": ["scenedetect=scenedetect.__main__:main"]},
76-
classifiers=[
77-
'Development Status :: 5 - Production/Stable',
78-
'Environment :: Console',
79-
'Environment :: Console :: Curses',
80-
'Intended Audience :: Developers',
81-
'Intended Audience :: End Users/Desktop',
82-
'Intended Audience :: System Administrators',
83-
'License :: OSI Approved :: MIT License',
84-
'Operating System :: OS Independent',
85-
'Programming Language :: Python :: 3',
86-
'Programming Language :: Python :: 3.6',
87-
'Programming Language :: Python :: 3.7',
88-
'Programming Language :: Python :: 3.8',
89-
'Programming Language :: Python :: 3.9',
90-
'Topic :: Multimedia :: Video',
91-
'Topic :: Multimedia :: Video :: Conversion',
92-
'Topic :: Multimedia :: Video :: Non-Linear Editor',
93-
'Topic :: Utilities'
94-
],
95-
project_urls={
96-
'Homepage': 'https://pyscenedetect.readthedocs.io/',
97-
'Manual': 'https://manual.scenedetect.com/en/v0.6/',
98-
'Changelog': 'https://scenedetect.com/changelog/',
99-
'Bug Tracker': 'https://github.com/Breakthrough/PySceneDetect/issues',
100-
}
21+
setup_requires=["pytest-runner"],
22+
tests_require=["pytest"],
10123
)

0 commit comments

Comments
 (0)