structured setup.py

This commit is contained in:
AlfredoSequeida 2020-10-07 07:14:32 -07:00
parent d60a28e813
commit e4478d4c11
4 changed files with 74 additions and 2 deletions

2
fvid/__init__.py Normal file
View File

@ -0,0 +1,2 @@
__version__ = "0.0.1"

5
fvid/__main__.py Normal file
View File

@ -0,0 +1,5 @@
import sys
from fvid import main
if __name__ == '__main__':
sys.exit(main())

View File

@ -188,8 +188,7 @@ def setup():
os.makedirs(FRAMES_DIR)
if __name__ == "__main__":
def main():
parser = argparse.ArgumentParser(description="save files as videos")
parser.add_argument(
"-e", "--encode", help="encode file as video", action="store_true"

66
setup.py Normal file
View File

@ -0,0 +1,66 @@
import os
import codecs
from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), "r") as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
dynamic_version = get_version("fvid/__init__.py")
setup(
name="fvid",
version=dynamic_version,
author="Alfredo Sequeida",
description="fvid is a project that aims to encode any file as a video using 1-bit color images to survive compression algorithms for data retrieval.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/AlfredoSequeida/fvid",
download_url="https://github.com/AlfredoSequeida/fvid/archive/"
+ dynamic_version
+ ".tar.gz",
keywords="fvid youtube videos files bitdum hexdump ffmpeg video file",
platforms="any",
classifiers=[
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: Microsoft :: Windows :: Windows 8",
"Operating System :: Microsoft :: Windows :: Windows 8.1",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
],
license="MIT",
packages=["fvid"],
install_requires=[
"bitstring",
"python-magic",
"pillow",
"numpy",
"tqdm",
"ffmpeg-python",
],
python_requires=">=3",
entry_points={"console_scripts": ["fvid = fvid.fvid:main"]},
)