1
+ import io
2
+ import json
3
+ import os
4
+ import sys
5
+ from pathlib import Path
6
+ from setuptools import setup , find_packages
7
+
8
+ # Package meta-data.
9
+ NAME = "slicegui"
10
+ DESCRIPTION = "Variable font instance generator PyQt5 GUI application"
11
+ LICENSE = "GNU General Public License v3 (GPLv3)"
12
+ URL = "https://github.com/source-foundry/Slice"
13
+
14
+ AUTHOR = "Source Foundry Authors"
15
+ REQUIRES_PYTHON = ">=3.6.0"
16
+
17
+ INSTALL_REQUIRES = [
18
+ "fontTools >= 4.21.1" ,
19
+ ]
20
+ # Optional packages
21
+ EXTRAS_REQUIRES = {
22
+ # for developer installs
23
+ "dev" : ["coverage" , "pytest" , "pytest-qt" , "tox" , "flake8" , "black" , "isort" ],
24
+ # for maintainer installs
25
+ "maintain" : ["wheel" , "setuptools" , "twine" ],
26
+ }
27
+
28
+ this_file_path = os .path .abspath (os .path .dirname (__file__ ))
29
+
30
+ # Version
31
+ with open (Path ("src/build/settings/base.json" )) as f :
32
+ base_json = json .load (f )
33
+ VERSION = base_json ["version" ]
34
+
35
+ # Use repository Markdown README.md for PyPI long description
36
+ try :
37
+ with io .open ("README.md" , encoding = "utf-8" ) as f :
38
+ readme = f .read ()
39
+ except IOError as readme_e :
40
+ sys .stderr .write (
41
+ "[ERROR] setup.py: Failed to read the README.md file for the long description definition: {}" .format (
42
+ str (readme_e )
43
+ )
44
+ )
45
+ raise readme_e
46
+
47
+ setup (
48
+ name = NAME ,
49
+ version = VERSION ,
50
+ description = DESCRIPTION ,
51
+ author = AUTHOR ,
52
+ author_email = EMAIL ,
53
+ url = URL ,
54
+ license = LICENSE ,
55
+ platforms = ["Any" ],
56
+ long_description = readme ,
57
+ long_description_content_type = "text/markdown" ,
58
+ package_dir = {"" : "src" },
59
+ packages = find_packages ("src" ),
60
+ include_package_data = True ,
61
+ install_requires = INSTALL_REQUIRES ,
62
+ extras_require = EXTRAS_REQUIRES ,
63
+ python_requires = REQUIRES_PYTHON ,
64
+ entry_points = {"console_scripts" : ["slicegui = slice.__main__:main" ]},
65
+ classifiers = [
66
+ "Development Status :: 4 - Beta" ,
67
+ "Intended Audience :: Developers" ,
68
+ "Intended Audience :: End Users/Desktop" ,
69
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)" ,
70
+ "Natural Language :: English" ,
71
+ "Operating System :: OS Independent" ,
72
+ "Programming Language :: Python" ,
73
+ "Programming Language :: Python :: 3" ,
74
+ "Programming Language :: Python :: 3.6" ,
75
+ "Programming Language :: Python :: 3.7" ,
76
+ "Programming Language :: Python :: 3.8" ,
77
+ "Programming Language :: Python :: 3.9" ,
78
+ "Topic :: Multimedia" ,
79
+ ],
80
+ )
0 commit comments