Skip to content

fixup package to use pyproject.toml #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
Standard installation

```bash
$ pip3 install video-to-ascii
$ pip install video-to-ascii
```

With audio support installation

```bash
$ pip3 install video-to-ascii --install-option="--with-audio"
$ pip install video-to-ascii[audio] # or "video-to-ascii[audio]" on zsh
```

## How to use
Expand Down
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "video_to_ascii"
version = "1.3.0"
description = "It is a simple python package to play videos in the terminal"
readme = "README.md"
authors = [
{name = "Joel Ibaceta", email = "[email protected]"},
]
license = {text = "MIT"}
classifiers = [
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
keywords = ["video", "ascii", "terminal", "opencv"]
dependencies = [
"xtermcolor >= 1.3",
"ffmpeg-python >= 0.2.0",
"opencv-python >= 4.11.0.86",
]
requires-python = ">=3.6"

[project.optional-dependencies]
audio = [
"pyaudio >= 0.2.14",
]

[project.urls]
Homepage = "https://github.com/joelibaceta/video-to-ascii"
Source = "https://github.com/joelibaceta/video-to-ascii"
Tracker = "https://github.com/joelibaceta/video-to-ascii/issues"

[project.scripts]
video-to-ascii = "video_to_ascii.cli:main"

[tool.setuptools]
packages = ["video_to_ascii"]
include-package-data = true
57 changes: 7 additions & 50 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,8 @@
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
from setuptools import setup

def install_package(package):
import pip
try:
from pip._internal import main
main.main(['install', package])
except AttributeError:
from pip import __main__
__main__._main(['install', package])

if "--with-audio" in sys.argv:
install_package('opencv-python')
install_package('pyaudio')
sys.argv.remove("--with-audio")
else:
install_package('opencv-python')

setup(
name="video_to_ascii",
version="1.3.0",
author="Joel Ibaceta",
author_email="[email protected]",
license='MIT',
description="It is a simple python package to play videos in the terminal",
long_description="A simple tool to play a video using ascii characters instead of pixels",
url="https://github.com/joelibaceta/video-to-ascii",
project_urls={
'Source': 'https://github.com/joelibaceta/video-to-ascii',
'Tracker': 'https://github.com/joelibaceta/video-to-ascii/issues'
},
packages=find_packages(),
include_package_data=True,
install_requires=['xtermcolor', 'ffmpeg-python'],
classifiers=[
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
keywords='video ascii terminal opencv',
entry_points={
"console_scripts": [
'video-to-ascii=video_to_ascii.cli:main'
]
}
)
if __name__ == "__main__":
setup(
extras_require={
"audio": ["pyaudio"],
}
)