Skip to content

Commit f06511b

Browse files
committed
Releasing new version
1 parent 144f63c commit f06511b

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

delphifmx/__init__.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import sys, os, sys, platform
1+
import sys, os, sys, platform, ctypes
22
from os import environ
33
import importlib, importlib.machinery, importlib.util
44

@@ -60,8 +60,24 @@ def findmodule():
6060
else:
6161
raise ValueError("Unsupported platform.")
6262

63+
def findfixup(dir, libext):
64+
for fname in os.listdir(dir):
65+
if ('libFixup' in fname) and (fname.endswith(libext)):
66+
return os.path.join(dir, os.path.basename(fname))
67+
6368
def new_import():
6469
modulefullpath = findmodule()
70+
71+
#Look for a fixup lib
72+
base_path = os.path.basename(modulefullpath)
73+
if base_path:
74+
_, ext = os.path.splitext(modulefullpath)
75+
#Try to find the fixup lib based on the module path
76+
fixup_lib = findfixup(base_path, ext)
77+
if fixup_lib:
78+
#Loads the fixup lib
79+
ctypes.cdll.LoadLibrary(fixup_lib)
80+
6581
loader = importlib.machinery.ExtensionFileLoader("DelphiFMX", modulefullpath)
6682
spec = importlib.util.spec_from_file_location("DelphiFMX", modulefullpath,
6783
loader=loader, submodule_search_locations=None)

delphifmx/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.54"
1+
__version__ = "1.0.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def get_release_version():
9292
license="Other/Proprietary License",
9393
license_files=["LICENSE.md"],
9494
url = "https://github.com/Embarcadero/DelphiFMX4Python",
95-
python_requires=">=3.3<=3.11",
95+
python_requires=">=3.3",
9696
packages=[pkgname],
9797
package_data={pkgname: pkgdata},
9898
classifiers=[

0 commit comments

Comments
 (0)