Debian Codegraph @

setup.py

raw
1 #!/usr/bin/env python3
2
3 # SPDX-License-Identifier: GPL-3.0-or-later
4 # Copyright (c) 2008-2026 Andrew Ziem.
5 #
6 # This work is licensed under the terms of the GNU GPL, version 3 or
7 # later. See the COPYING file in the top-level directory.
8
9 """
10 Build BleachBit tarballs
11 """
12
13 # standard library
14 import glob
15 import os
16
17 # local import
18 import bleachbit
19
20
21 APP_DESCRIPTION = "BleachBit frees space and maintains privacy by quickly wiping files you don't need and didn't know you had."
22
23 data_files = []
24 if bleachbit.IS_LINUX:
25 data_files.append(('/usr/share/applications',
26 ['./org.bleachbit.BleachBit.desktop']))
27 data_files.append(('/usr/share/pixmaps/', ['./bleachbit.png']))
28 elif bleachbit.IS_NETBSD:
29 data_files.append(('/usr/pkg/share/applications',
30 ['./org.bleachbit.BleachBit.desktop']))
31 data_files.append(('/usr/pkg/share/pixmaps/', ['./bleachbit.png']))
32 elif bleachbit.IS_BSD:
33 data_files.append(
34 ('/usr/local/share/applications', ['./org.bleachbit.BleachBit.desktop']))
35 data_files.append(('/usr/local/share/pixmaps/', ['./bleachbit.png']))
36
37
38 def run_setup(args=None):
39 """Run setup from setuptools"""
40 if args is None:
41 args = {}
42 # pylint: disable=import-outside-toplevel
43 from setuptools import setup
44 setup(name='bleachbit',
45 version=bleachbit.APP_VERSION,
46 description=bleachbit.APP_NAME,
47 long_description=APP_DESCRIPTION,
48 author="Andrew Ziem",
49 author_email="[email protected]",
50 url=bleachbit.APP_URL,
51 download_url="https://www.bleachbit.org/download",
52 classifiers=[
53 'Development Status :: 5 - Production/Stable',
54 'Programming Language :: Python',
55 'Operating System :: Microsoft :: Windows',
56 'Operating System :: POSIX :: Linux',
57 ],
58 license='GPL-3.0-or-later',
59 # py_requires='>=3.8',
60 # Ubuntu 20.04 LTS is EOL on April 2025, and it has Python 3.8.
61 platforms='Linux and Windows, Python v3.8+, GTK v3.24+',
62 packages=['bleachbit', 'bleachbit.markovify'],
63 **args)
64
65
66 def supported_languages():
67 """Return list of supported languages by scanning ./po/
68
69 This function is used by:
70 * windows/setup.py
71 * bleachbit-misc/extract_desktop.py
72 """
73 langs = []
74 for pathname in glob.glob('po/*.po'):
75 basename = os.path.basename(pathname)
76 langs.append(os.path.splitext(basename)[0])
77 return sorted(langs)
78
79
80 if __name__ == '__main__':
81 run_setup()