From 36d9bcdc5a76afe8106c4620dd2cff679c8e361b Mon Sep 17 00:00:00 2001 From: william Date: Sat, 21 Sep 2024 22:18:33 +0200 Subject: [PATCH] Fix issue #140 : make project pip installable. * Use importlib to retrieve version. * Remove analyzeMFT.py as a script --- __init.py__ | 0 requirements.txt | 3 +-- setup.py | 5 +---- src/analyzeMFT/constants.py | 3 ++- 4 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 __init.py__ diff --git a/__init.py__ b/__init.py__ deleted file mode 100644 index e69de29..0000000 diff --git a/requirements.txt b/requirements.txt index 1704f18..7f5213a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -openpyxl==3.0.10 -sqlite3 \ No newline at end of file +openpyxl==3.0.10 \ No newline at end of file diff --git a/setup.py b/setup.py index ac14b73..25af76f 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,11 @@ from setuptools import setup, find_packages -from src.analyzeMFT.constants import VERSION with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name='analyzeMFT', - version=VERSION, + version='3.0.6.6', author='Benjamin Cance', author_email='bjc@tdx.li', package_dir={'': 'src'}, @@ -19,14 +18,12 @@ description='Analyze the $MFT from a NTFS filesystem.', long_description=long_description, long_description_content_type='text/markdown', - scripts=['analyzeMFT.py'], classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/src/analyzeMFT/constants.py b/src/analyzeMFT/constants.py index 46fdfd6..32239bc 100644 --- a/src/analyzeMFT/constants.py +++ b/src/analyzeMFT/constants.py @@ -1,4 +1,5 @@ -VERSION = '3.0.6.6' +from importlib.metadata import version +VERSION = version('analyzeMFT') # File Record Flags FILE_RECORD_IN_USE = 0x0001