From a685524dd51138cd2f56b04b86ad08d860e74355 Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Wed, 18 Aug 2021 04:12:38 -0500 Subject: [PATCH] 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. --- .gitignore | 1 + MANIFEST.in | 3 +++ setup.cfg | 43 +++++++++++++++++++++++++++++++++++++++++++ setup.py | 29 +++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 MANIFEST.in create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index c9046fe6..ff5fc581 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store __pycache__ +*.egg-info *.so *.mo *.waf* diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..001f3e67 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +recursive-include core *.h +recursive-include core *.m +include run.py \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..8076a077 --- /dev/null +++ b/setup.cfg @@ -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 diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..f7e88fa3 --- /dev/null +++ b/setup.py @@ -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, +)