Skip to content

Commit 88ffa56

Browse files
committed
Removing the MacOS fixup
1 parent b3d2912 commit 88ffa56

File tree

5 files changed

+10
-36
lines changed

5 files changed

+10
-36
lines changed

delphifmx/__init__.py

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

@@ -13,7 +13,7 @@ def findmodule():
1313
libdir = None
1414
libext = None
1515

16-
if not (pyver in ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]):
16+
if not (pyver in ["3.6", "3.7", "3.8", "3.9", "3.10"]):
1717
raise PyVerNotSupported(f"DelphiFMX doesn't support Python{pyver}.")
1818

1919
if ossys == "Windows":
@@ -60,24 +60,8 @@ 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-
6863
def new_import():
6964
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-
8165
loader = importlib.machinery.ExtensionFileLoader("DelphiFMX", modulefullpath)
8266
spec = importlib.util.spec_from_file_location("DelphiFMX", modulefullpath,
8367
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__ = "1.0.0"
1+
__version__ = "1.0.1"

lib/OSX64/libFixup.dylib

-4.71 MB
Binary file not shown.

lib/OSXARM64/libFixup.dylib

-4.74 MB
Binary file not shown.

setup.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import setuptools, os, sys, platform, distutils.dir_util
1+
import setuptools, os, sys, json, platform, shutil, distutils.dir_util
22
from pathlib import Path
3+
from setuptools.command.install import install
4+
from setuptools.command.develop import develop
35

46
pkgname = "delphifmx"
57

@@ -55,26 +57,15 @@ def get_release_version():
5557
else:
5658
raise ValueError("Unsupported platform.")
5759

58-
#Copy the doc files to the package folder into the doc subfolder
59-
if os.path.exists(os.path.join("docs", "xml", "docs.xml")):
60-
pkg_doc_dir = os.path.join(pkg_dir, "doc")
61-
if not os.path.exists(pkg_doc_dir):
62-
os.mkdir(pkg_doc_dir)
63-
distutils.file_util.copy_file(os.path.join("docs", "xml", "docs.xml"), os.path.join(pkg_doc_dir, "docs.xml"))
64-
6560
#Create the package data.
6661
pkgdata = []
6762
for dir_, _, files in os.walk(pkg_dir):
6863
for file_name in files:
6964
rel_dir = os.path.relpath(dir_, pkg_dir)
70-
rel_file = os.path.join(rel_dir, file_name)
71-
#Add the shared library.
65+
rel_file = os.path.join(rel_dir, file_name)
7266
if ''.join(Path(rel_file).suffixes) in ['.pyd', '.tds', '.so', '.dylib', '.dylib.dSYM']:
7367
pkgdata.append(rel_file)
74-
#Add the doc xml file
75-
elif (rel_file.endswith('.xml')):
76-
pkgdata.append(rel_file)
77-
68+
print(pkgdata)
7869
#Read the current version from __version.py__
7970
versnewstr = get_release_version()
8071

@@ -92,7 +83,7 @@ def get_release_version():
9283
license="Other/Proprietary License",
9384
license_files=["LICENSE.md"],
9485
url = "https://github.com/Embarcadero/DelphiFMX4Python",
95-
python_requires=">=3.3",
86+
python_requires=">=3.3<=3.10",
9687
packages=[pkgname],
9788
package_data={pkgname: pkgdata},
9889
classifiers=[
@@ -106,7 +97,6 @@ def get_release_version():
10697
'Programming Language :: Python :: 3.8',
10798
'Programming Language :: Python :: 3.9',
10899
'Programming Language :: Python :: 3.10',
109-
'Programming Language :: Python :: 3.11',
110100
'Programming Language :: Python :: 3 :: Only',
111101
'Operating System :: Microsoft :: Windows',
112102
'Operating System :: POSIX',
@@ -117,4 +107,4 @@ def get_release_version():
117107
cmdclass={
118108
'bdist_wheel': bdist_wheel
119109
}
120-
)
110+
)

0 commit comments

Comments
 (0)