anki/qt/setup.py
Damien Elmes 65cfcf9226 pare back dark mode support
Anki now solely relies on the night mode setting in the preferences
to decide whether to show in light or dark mode. Some users wanted
to run Anki in light mode while keeping the rest of their system dark,
and there were various display problems when dark mode was changed
after Anki started that couldn't be easily worked around.

NSRequiresAquaAppearance is set again, which means we can rely on
the interface appearing properly and not changing as the macOS theme
is changed.

Users who only use dark mode, and preferred the native look of widgets
in dark mode, can achieve the previous appearance by running the
following command in the terminal:

defaults write net.ankiweb.dtop NSRequiresAquaSystemAppearance -bool no

And the following in the debug console:

mw.pm.meta["dark_mode_widgets"] = True

This is hidden behind a debug console command because it requires the
user ensure their system is always set to the same light/dark mode
as Anki.
2020-04-15 21:44:56 +10:00

52 lines
1.2 KiB
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import setuptools
def package_files(directory):
entries = []
for (path, directories, filenames) in os.walk(directory):
entries.append((path, [os.path.join(path, f) for f in filenames]))
return entries
# just the Python files for type hints?
pyonly = os.getenv("PYFILESONLY")
if pyonly:
extra_files = []
else:
extra_files = package_files("aqt_data")
install_requires = [
"beautifulsoup4",
"requests",
"send2trash",
"pyaudio",
"markdown",
"jsonschema",
"pyqt5>=5.9",
'psutil; sys.platform == "win32"',
'pywin32; sys.platform == "win32"',
]
setuptools.setup(
name="aqt",
version="2.1.24", # automatically updated
author="Ankitects Pty Ltd",
description="Anki's Qt GUI code",
long_description="Anki's QT GUI code",
long_description_content_type="text/markdown",
url="https://apps.ankiweb.net",
packages=setuptools.find_packages(".", exclude=["tests"]),
data_files=extra_files,
license="License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
classifiers=[],
python_requires=">=3.7",
package_data={"aqt": ["py.typed"]},
install_requires=install_requires,
)