Add files for more standardized build tools

- Prior investigation into linux packaging (not using pyinstaller) suggested
having setuptools files could make packaging easier and automatable
- Add setup.cfg and setup.py as initial starting point
- Add MANIFEST.in (at least temporarily)

Currently with the python build module this almost works for main application.
It does not include all the extra data files right now.
This commit is contained in:
Andrew Senetar 2021-08-18 04:12:38 -05:00
parent 74918e2c56
commit a685524dd5
Signed by: arsenetar
GPG Key ID: C63300DCE48AB2F1
4 changed files with 76 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.DS_Store
__pycache__
*.egg-info
*.so
*.mo
*.waf*

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
recursive-include core *.h
recursive-include core *.m
include run.py

43
setup.cfg Normal file
View File

@ -0,0 +1,43 @@
[metadata]
name = dupeGuru
version = attr: core.__version__
url = https://github.com/arsenetar/dupeguru
project_urls =
Bug Reports = https://github.com/arsenetar/dupeguru/issues
author = Andrew Senetar
author_email = arsenetar@voltaicideas.net
license = GPLv3
license_files = license
description = dupeGuru is a tool to find duplicate files on your computer.
long_description = file:README.md
long_description_content_type = text/markdown
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: End Users/Desktop
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Topic :: Desktop Environment :: File Managers
[options]
packages = find:
python_requires = >=3.6
install_requires =
Send2Trash>=1.3.0
polib>=1.1.0
hsaudiotag3k>=1.1.3*
distro>=1.5.0
PyQt5 >=5.14.1,<6.0; sys_platform != 'linux'
pywin32>=228; sys_platform == 'win32'
tests_require =
pytest >=6,<7
[options.entry_points]
console_scripts =
dupeguru = run.py

29
setup.py Normal file
View File

@ -0,0 +1,29 @@
from setuptools import setup, Extension
from pathlib import Path
exts = [
Extension(
"_block",
[
str(Path("core", "pe", "modules", "block.c")),
str(Path("core", "pe", "modules", "common.c")),
],
include_dirs=[str(Path("core", "pe", "modules"))],
),
Extension(
"_cache",
[
str(Path("core", "pe", "modules", "cache.c")),
str(Path("core", "pe", "modules", "common.c")),
],
include_dirs=[str(Path("core", "pe", "modules"))],
),
Extension("_block_qt", [str(Path("qt", "pe", "modules", "block.c"))]),
]
headers = [str(Path("core", "pe", "modules", "common.h"))]
setup(
ext_modules=exts,
headers=headers,
)