-
Notifications
You must be signed in to change notification settings - Fork 303
/
setup.py
50 lines (44 loc) · 1.53 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import subprocess
import sys
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
import os
cwd = os.path.dirname(os.path.abspath(__file__))
with open("README.md", "r", encoding='utf-8') as fh:
long_description = fh.read()
with open('requirements.txt') as f:
requirements = f.read().splitlines()
class PostInstallCommand(install):
def run(self):
install.run(self)
try:
subprocess.run([sys.executable, 'python -m', 'unidic', 'download'], check=True)
except Exception:
print("unidic download failed during installation, but it will be re-attempted a diffrent way when the app itself runs.")
setup(
name='ebook2audiobook',
version='2.0.0',
python_requires=">=3.10,<3.13",
author="Drew Thomasson",
description="Convert eBooks to audiobooks with chapters and metadata",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/DrewThomasson/ebook2audiobook",
packages=find_packages(),
install_requires=requirements,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
include_package_data=True,
entry_points={
"console_scripts": [
"ebook2audiobook = app:main",
],
},
cmdclass={
'install': PostInstallCommand,
}
)