Skip to content

Commit

Permalink
corrigido a instalação do pacote no pypi(#59)
Browse files Browse the repository at this point in the history
close #59
  • Loading branch information
hadtrindade committed Jul 2, 2022
1 parent 0e3418f commit aa8cbb8
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 27 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ Baixar o instalador [Link](https://github.com/hadtrindade/conversor-e-divisor/re
## macOS:
brew install ffmpeg gpac

## Como abrir o Conversor&Dividor usando o terminal:
$ conversor-divisor

### Download dos binários para Windows, caso queira instalar o conversor pelo código fonte [Link](https://drive.google.com/drive/folders/1h_ySXbsgu-hWg_ZKAWhqQx4mCNzQy3eU?usp=sharing).
2 changes: 1 addition & 1 deletion conversor_divisor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = 'v3.2.0'
__version__ = 'v3.2.3'
__author__ = 'Ivo H. Trindade Silva'
6 changes: 2 additions & 4 deletions conversor_divisor/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ def handbrake(self, media: Path) -> Path:
'-i',
media.absolute(),
'-w',
f"{self.settings['convert']['resolution'].split('x')[0]}"
'-l',
f"{self.settings['convert']['resolution'].split('x')[1]}"
'-e',
f"{self.settings['convert']['resolution'].split('x')[0]}" '-l',
f"{self.settings['convert']['resolution'].split('x')[1]}" '-e',
'mpeg4',
'--rate',
'30',
Expand Down
9 changes: 7 additions & 2 deletions conversor_divisor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def read(self) -> Dict:
data = toml.load(file_settings)
if data.keys() == self.default.keys():
if data['split'].keys() == self.default['split'].keys():
if data['convert'].keys() == self.default['convert'].keys():
if (
data['convert'].keys()
== self.default['convert'].keys()
):
return data
else:
file_settings.unlink()
Expand Down Expand Up @@ -70,6 +73,8 @@ def write(self, setting: Text = None, **kwargs: Any) -> None:
data = toml.load(file_settings)
for k, v in kwargs.items():
data[setting][k] = v
with open(self.path.joinpath('settings.toml').absolute(), 'w') as f:
with open(
self.path.joinpath('settings.toml').absolute(), 'w'
) as f:
toml.dump(data, f)
return self.read()
4 changes: 3 additions & 1 deletion requirements-dev.txt → requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ pytest-qt
blue
isort

-r requirements.txt
PySide2
toml
auto-py-to-exe
61 changes: 42 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,66 @@
import io
import os

from setuptools import setup, find_packages


def read(filename):
return [requirement.strip() for requirement in open(filename).readlines()]
def read(*names, **kwargs):
"""Read a file."""
content = ''
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8'),
) as open_file:
content = open_file.read().strip()
return content


PACKAGE = "conversor_divisor"
NAME = "conversor_divisor"
DESCRIPTION = "software for converting and splitting medias"
PACKAGE = 'conversor_divisor'
NAME = 'conversor_divisor'
DESCRIPTION = 'software for converting and splitting medias'
AUTHOR = __import__(PACKAGE).__author__
AUTHOR_EMAIL = "haddleytrindade@gmail.com"
URL = "https://github.com/hadtrindade/conversor-e-divisor"
AUTHOR_EMAIL = 'haddleytrindade@gmail.com'
URL = 'https://github.com/hadtrindade/conversor-e-divisor'
VERSION = __import__(PACKAGE).__version__

setup(
name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license="MIT",
keywords="GUI for converting and splitting medias using ffmpeg and mp4box",
license='MIT',
keywords='GUI for converting and splitting medias using ffmpeg and mp4box',
url=URL,
description=DESCRIPTION,
packeges=find_packages(
exclude=["tests", "dist", "build", "FFmpeg", "MP4Box", "HandBrakeCLI",]
long_description=read('README.md'),
long_description_content_type='text/markdown',
install_requires=read('requirements.txt'),
extras_require={'dev': read('requirements_dev.txt')},
packages=find_packages(
exclude=[
'tests',
'dist',
'build',
'FFmpeg',
'MP4Box',
'HandBrakeCLI',
]
),
include_package_data=True,
install_requires=read("requirements.txt"),
python_requires='>=3.8',
entry_points={
"console_scripts": [
"conversor_divisor=conversor_divisor.app:start_app",
'console_scripts': [
'conversor-divisor=conversor_divisor.app:start_app',
],
},
setup_requires=['setuptools>=38.6.0'],
classifiers=[
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Framework :: Pytest",
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.10',
'Framework :: Pytest',
],
zip_safe=False,
platforms='any',
)

0 comments on commit aa8cbb8

Please sign in to comment.