473,382 Members | 1,657 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to disable tk inclusion in py build

Hi folks,

I'd like to disable the inclusion of tk graphics lib in my py build.
Looked around but couldn't find a clear answer. Which one of
the following would I need to use in the configure step:
--disable-tkbuild
--without-tk

Thanks,
/venkat

Jun 27 '06 #1
4 2069
ve******@yahoo.com wrote:
I'd like to disable the inclusion of tk graphics lib in my py build.
Looked around but couldn't find a clear answer. Which one of
the following would I need to use in the configure step:
--disable-tkbuild
--without-tk


since _tkinter.so is only built if it's found by the setup script,
and if built, it's only loaded if you actually use it, why bother
"disabling" it ?

</F>

Jun 27 '06 #2
Hi Fredrick,
since _tkinter.so is only built if it's found by the setup script,
and if built, it's only loaded if you actually use it, why bother
"disabling" it ?


I don't want it to build tk into the py dist, even if it finds it on
the build box - its not needed in the deployment. Keeping it
out will make the deployed pkg leaner. Don't want end-users
accessing it, since its not meant to be accessed.

Thanks,
/venkat

Jun 27 '06 #3
ve******@yahoo.com wrote:
since _tkinter.so is only built if it's found by the setup script,
and if built, it's only loaded if you actually use it, why bother
"disabling" it ?


I don't want it to build tk into the py dist, even if it finds it on
the build box - its not needed in the deployment. Keeping it
out will make the deployed pkg leaner.


so don't deploy it.

if you want a lean package, you should use a deployment script that copies
the stuff you need; relying on the build process isn't very reliable (and means
more work when it's time to upgrade to a newer Python).

</F>

Jun 28 '06 #4
> I'd like to disable the inclusion of tk graphics lib in my py build.
Looked around but couldn't find a clear answer. Which one of
the following would I need to use in the configure step:
--disable-tkbuild
--without-tk


In case anyone is intereted, as it turns out, one way of achieving
this is to disable the following statement in python's setup.py:
self.detect_tkinter(inc_dirs, lib_dirs)
of
def detect_modules(self):
This will ignore the compilation of _tkinter.c and tkappinit.c of
the python distribution.

This will totally skip the detection and inclusion of tk/tcl into
the "built-in" pkg, irrespective of its presence on the buildbox.
This will also work in the case of cross-compile builds of python.
In the cross-compile case, there is a likelihood of the build process
attempting to pick tk/tcl lib files from the buildbox (platform) and
using it wrongly for the different target platform.

In addition, one would also have to skip the inclusion of the
python2.x/Lib/lib-tk/*.py
files in the final dist. Just this exclusion is not enuff, the earlier
detection step change is also needed to prevent all the buildtime
errors.

Thanks,
/venkat

Jun 29 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: qazmlp | last post by:
I need to include a list of - C++ headers - headers of other modules - headers of my module - implementation specific ie.OS headers In what order, they should be included in my .CPP file?...
14
by: Fritz Foetzl | last post by:
I'm flummoxed. I'm a veteran C++ programmer from the Unix/Linux camp, trying to learn Visual C++. I'm trying to build a project in which I need to include one header in a couple of different files,...
5
by: Dave | last post by:
Hello all, To protect against multiple inclusions, it is standard practice to enclose the contents of a header file in a construct like this: #ifndef FOO_INCLUDED #define FOO_INCLUDED .......
1
by: rajesh_krec | last post by:
Hello Everybody, I'm using Microsoft Visual Studio .NET 2003 (with Vc7 compiler) I have some 15 projects each of which generate a static library when i build the solution in release mode. ...
6
by: techBoy | last post by:
I am looking for a tool that can scan my soyrce code and check if a header file gets included more then once in a sequece of compiled code. Can some one guide me to such a tool !!
4
by: Matrixreloadedth | last post by:
How to change disable color of Checkbox??? I have a checkbox with forecolor in red but when i disable by set Enable properties to false forecolor is changed to gray color but i don't want it. how...
6
by: Juha Nieminen | last post by:
Multiple inclusion of the same header file can cause the compilation to fail because of multiple definitions of the same type. That's why it's standard practice to write all headers like this: ...
7
by: Parag Mahajan | last post by:
Hi, I would like to know if there is any way / tool available by which we can detect unnecessary header files included in the source files. Regards, Parag.
3
by: Venturini | last post by:
I am trying to put together a web page where the customer makes choices of products and is then given a total. I am extremely new to Javascript and have managed to get as far as I have from web...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.