Skip to content

Commit aa60c19

Browse files
authored
Small fixes (#71)
* Banner fix * Code clean-up * Defining accepted package data files
1 parent 83cff7c commit aa60c19

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Delphi's VCL library allows for building native Windows GUI Applications.
1212

1313
There is a free [eBook and styles bundle](https://embt.co/PythonGUIBundle) with 29 custom styles and 50 pages of content.
1414

15-
<a href="https://embt.co/PythonGUIBundle"><img alt="Download the free eBook and Python styles bundle." src="https://github.com/Embarcadero/PythonFMXBuilder/blob/main/images/30_Banner_Ebook_GGetting Started with Python GUI_830x256.jpg"></a>
15+
<a href="https://embt.co/PythonGUIBundle"><img alt="Download the free eBook and Python styles bundle." src="https://github.com/Embarcadero/DelphiVCL4Python/blob/main/images/30_Banner_Ebook_Getting_Started_with_Python_GUI_830x256.jpg?raw=true"></a>
1616

1717
## Installation: ##
1818

delphivcl/__init__.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import sys
22
import os
3-
import sys
43
import platform
54
import importlib
6-
import importlib.machinery
7-
import importlib.util
85

96

107
def find_extension_module():
@@ -23,22 +20,23 @@ def find_extension_module():
2320
# Win x86
2421
lib_dir = "Win32"
2522

26-
if lib_dir:
27-
lib_dir = os.path.join(os.path.dirname(
28-
os.path.abspath(__file__)), lib_dir)
29-
if not os.path.exists(lib_dir):
30-
raise ValueError(
31-
"DelphiVCL module not found. \
32-
Try to reinstall the delphivcl package or check for support compatibility.")
33-
34-
for file_name in os.listdir(lib_dir):
35-
if 'DelphiVCL' in file_name:
36-
return os.path.join(lib_dir, os.path.basename(file_name))
37-
raise ValueError(
38-
"DelphiVCL module not found. Try to reinstall the delphivcl package.")
39-
else:
23+
if not lib_dir:
4024
raise ValueError("Unsupported platform.")
4125

26+
lib_dir = os.path.join(os.path.dirname(
27+
os.path.abspath(__file__)), lib_dir)
28+
if not os.path.exists(lib_dir):
29+
raise ValueError(
30+
"DelphiVCL module not found. \
31+
Try to reinstall the delphivcl package or check for support compatibility.")
32+
33+
for file_name in os.listdir(lib_dir):
34+
if 'DelphiVCL' in file_name:
35+
return os.path.join(lib_dir, os.path.basename(file_name))
36+
37+
raise ValueError(
38+
"DelphiVCL module not found. Try to reinstall the delphivcl package.")
39+
4240

4341
def new_import():
4442
lib_path = find_extension_module()
Loading

setup.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ python_requires = >=3
5151
setup_requires =
5252
setuptools_scm
5353
cmdclass =
54-
bdist_wheel = build.BDistWheel
54+
bdist_wheel = build.BDistWheel
55+
56+
[options.package_data]
57+
* = *.pyd, *.xml

0 commit comments

Comments
 (0)