Skip to content

Commit 88dc7e5

Browse files
committed
Add Tcl files to package_data, change custom target
1 parent 7d626c3 commit 88dc7e5

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,16 @@ ADD_CUSTOM_TARGET ( copy ALL ${CMAKE_COMMAND} -E copy
140140
${CMAKE_SOURCE_DIR}/src/fontnameinfo.tcl
141141
${CMAKE_SOURCE_DIR}/src/pkgIndex.tcl
142142
${CMAKE_SOURCE_DIR}/src/futmp.tcl
143-
./tkextrafont )
143+
${CMAKE_SOURCE_DIR}/tkextrafont )
144144
ADD_DEPENDENCIES ( ${PKG_TARGET_LIB_NAME} copy )
145145

146146
SET ( LIBRARY_OUTPUT_PATH tkextrafont )
147147
INSTALL ( TARGETS ${PKG_TARGET_LIB_NAME}
148148
RUNTIME DESTINATION ./tkextrafont
149149
LIBRARY DESTINATION ./tkextrafont
150150
ARCHIVE DESTINATION ./tkextrafont )
151+
INSTALL ( FILES tkextrafont/extrafont.tcl
152+
tkextrafont/fontnameinfo.tcl
153+
tkextrafont/futmp.tcl
154+
tkextrafont/pkgIndex.tcl
155+
DESTINATION ${PKG_TARGET_LIB_NAME} )

clean.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ rm cmake_install.cmake
77
rm -rf cmake-build-debug cmake-build-release
88
rm -rf CMakeFiles
99
rm -rf _skbuild
10-
rm -rf tkextrafont.egg_info
10+
rm -rf tkextrafont.egg-info
11+
rm Makefile MANIFEST extrafont.cbp
12+
rm -rf Testing
13+
rm -rf ./venv/lib/*tkextrafont*

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def copy_to_target(self, target: str):
175175
name="tkextrafont",
176176
version="v0.6.0",
177177
packages=["tkextrafont"],
178+
package_data={"tkextrafont": ["extrafont.tcl", "fontnameinfo.tcl", "futmp.tcl", "pkgIndex.tcl"]},
178179
description="Fonts loader for Tkinter",
179180
author="The extrafont and tkextrafont authors",
180181
url="https://github.com/TkinterEP/tkextrafont",

tkextrafont/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def is_font_available(self, font_name) -> bool:
111111
def load(window: tk.Tk):
112112
"""Load extrafont into a Tk interpreter"""
113113
local = os.path.abspath(os.path.dirname(__file__))
114-
print(local)
115114
with chdir(local):
116115
window.tk.eval("source pkgIndex.tcl")
117116
window.tk.eval("package require extrafont")

0 commit comments

Comments
 (0)