File: setup.py

package info (click to toggle)
pyexiftool 0.5.6-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 356 kB
  • sloc: python: 1,406; makefile: 5
file content (119 lines) | stat: -rw-r--r-- 3,968 bytes parent folder | download | duplicates (2)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# -*- coding: utf-8 -*-
#
# This file is part of PyExifTool.
#
# PyExifTool <http://github.com/sylikc/pyexiftool>
#
# Copyright 2019-2023 Kevin M (sylikc)
# Copyright 2012-2014 Sven Marnach
#
# Community contributors are listed in the CHANGELOG.md for the PRs
#
# PyExifTool is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the licence, or
# (at your option) any later version, or the BSD licence.
#
# PyExifTool is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING.GPL or COPYING.BSD for more details.


# this "could" still be used, but not the industry recommended option -- https://stackoverflow.com/questions/25337706/setuptools-vs-distutils-why-is-distutils-still-a-thing
#from distutils.core import setup

# recommended packager, though must be installed via PyPI
# https://packaging.python.org/tutorials/packaging-projects/#configuring-metadata
from setuptools import setup, find_packages

import re

def get_long_desc():
	""" read README.rst skipping some of the badges (don't need those showing up on PyPI) """

	with open("README.rst", "r", encoding="utf-8") as fh:
		long_desc = fh.read()

	# crop out the portion between HIDE_FROM_PYPI_START and HIDE_FROM_PYPI_END
	sub_pattern = r"^\.\. HIDE_FROM_PYPI_START.+\.\. HIDE_FROM_PYPI_END$"
	long_desc = re.sub(sub_pattern, "", long_desc, flags=re.MULTILINE | re.DOTALL)

	return long_desc


setup(
	# detailed list of options:
	# https://packaging.python.org/guides/distributing-packages-using-setuptools/

	# overview
	name="PyExifTool",
	# version is configured in setup.cfg - https://packaging.python.org/en/latest/guides/single-sourcing-package-version/
	#version=,
	license="GPLv3+/BSD",
	url="http://github.com/sylikc/pyexiftool",
	python_requires=">=3.6",

	# authors
	author="Kevin M (sylikc), Sven Marnach, various contributors",
	author_email="sylikc@gmail.com",

	# info
	description="Python wrapper for exiftool",
	long_description=get_long_desc(),
	long_description_content_type="text/x-rst",
	keywords="exiftool image exif metadata photo video photography",

	project_urls={
		# this seems to get populated in PyPI in reverse order
		"Source": "https://github.com/sylikc/pyexiftool",
		"Tracker": "https://github.com/sylikc/pyexiftool/issues",
		"Changelog": "https://github.com/sylikc/pyexiftool/blob/master/CHANGELOG.md",
		"Documentation": "https://sylikc.github.io/pyexiftool/",
	},


	classifiers=[
		# list is here:
		# https://pypi.org/classifiers/

		"Development Status :: 4 - Beta",

		"Intended Audience :: Developers",

		"License :: OSI Approved :: BSD License",
		"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",

		"Operating System :: OS Independent",

		"Programming Language :: Python",
		"Programming Language :: Python :: 3",
		"Programming Language :: Python :: 3 :: Only",
		"Programming Language :: Python :: 3.6",
		"Programming Language :: Python :: 3.7",
		"Programming Language :: Python :: 3.8",
		"Programming Language :: Python :: 3.9",

		"Topic :: Multimedia",
		"Topic :: Utilities",
	],


	# include is more robust that exclude
	packages=find_packages(
		#where=".",
		#exclude = ['test*','doc*'],
		include=['exiftool', 'exiftool.*'],
	),

	extras_require={
		"json": ["ujson", "simplejson", "orjson"],  # any supported alternative json parser for ExifTool
		"test": ["packaging"],  # dependencies to do tests
		"docs": ["packaging", "sphinx", "sphinx-autoapi", "sphinx-rtd-theme", "sphinx-autodoc-typehints"],  # dependencies to build docs
	},

	#package_dir={'exiftool': 'exiftool'},

	#py_modules=["exiftool"], - it is now the exiftool module
)