WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: python HTTPSHeader Error  (Read 5440 times)

Offline JoXo009

  • Full Member
  • ***
  • Posts: 152
python HTTPSHeader Error
« on: August 19, 2009, 11:18:19 AM »
Coming from Window I'm creating on my Win32 host machine a vBox image containing a HowTo setup a webpage with Appengine.

First I tried my code with Ubuntu as vBox guest-system with Python 2.5.2 installed. That worked fine, as the following screenshot may show.


Then I changed to TC to get a smaller vdi image. To add Python I downloaded the python.tcel extension containing Python 2.5.2 too.

But the same code working in Ubuntu failed in TC, as the following screenshot may show.


I think mayby the TC python.tcel extension does't support ssl.

What's the best solution for my problem?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: python HTTPSHeader Error
« Reply #1 on: August 19, 2009, 12:25:27 PM »
The python extension was one of the first extensions made for TC, and was compiled with minimal dependencies.  DB, Openssl, sqlite, Tk and such was not built in. 
Tthere has also been some interest in an update to Python.  That would result in the need to rebuild extensions that are dependent on it, like pycairo, pygtk, pyqt and such.  I think that the next major TC release would be the best time to update and add dependencies to python as a lot of extensions would need rebuilding at that time anyway.  Python, Openssl, as well as some other extensions that require a rebuild of their dependent apps would be due an update our next major release and it would be best to piece that together all at once at that time. 

Offline JoXo009

  • Full Member
  • ***
  • Posts: 152
Re: python HTTPSHeader Error
« Reply #2 on: August 19, 2009, 12:32:03 PM »
Thanks for your fast reply.

And till next TC release my only solution would be to install native Python myself - correct?

Not easy for a Linux newbie. :(

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: python HTTPSHeader Error
« Reply #3 on: August 19, 2009, 01:24:38 PM »
Actually running this script, after installing dependencies, will build a python.tcel.  I may rebuild the current version of python with more dependencies to provide more functionality.


http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/tce/src/python-2.5.2/python-2.5.2.tcbuild

Offline JoXo009

  • Full Member
  • ***
  • Posts: 152
Re: python HTTPSHeader Error
« Reply #4 on: August 19, 2009, 01:35:10 PM »
Vielen Dank   :) - surely that will help very much. Thank you.

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: python HTTPSHeader Error
« Reply #5 on: August 19, 2009, 03:50:47 PM »
If you are interested Jason, adding this line just before ./configure will enable SSL support.
Code: [Select]
sed -i -e '206,209 s/^.//' -e '206 s/\/ssl//' Modules/Setup.dist
And this would add openssl as a required dependency

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: python HTTPSHeader Error
« Reply #6 on: August 19, 2009, 04:44:52 PM »
Thanks. LFS lists these as python's optional dependencies to provide full functionality:  openssl, libgdbm, sqlite3, and tk.  We have all of these and they would not add that much installed size.  I will recompile with these deps.

Offline JoXo009

  • Full Member
  • ***
  • Posts: 152
Re: python HTTPSHeader Error
« Reply #7 on: August 20, 2009, 10:41:13 AM »
Hi,
your script is great. After setting up a vBox-system with enough resources (430 MB RAM, 2 GB virtual HD) and learning how to do scripting and permission management in Linux it was very easy.

The extensions compiletc.tce, bash.tce and openssl-0.9.8h-devs.tce were installed quickly. (openssl-0.9.8h.tcel was already there)

I opened a (don't know if necessary: root-) terminal, typed ./<scriptname> hit Enter and the script started without any problems.

The Python source was downloaded automatically, then the building of 'my' first extension begun. A big number of message lines where output into the terminal. That lasted for about six minutes.

And the last message read: 'python-2.5.2.tcel ... is now in your home directory'.

You made me happy.

And this Python-2.5.2 ssl-patched with the above code line of KingDomcome is working, as the following screenshot may show:


Thank you very much

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: python HTTPSHeader Error
« Reply #8 on: August 23, 2009, 04:18:11 PM »
Tthere has also been some interest in an update to Python.  That would result in the need to rebuild extensions that are dependent on it, like pycairo, pygtk, pyqt and such.  I think that the next major TC release would be the best time to update and add dependencies to python as a lot of extensions would need rebuilding at that time anyway.

Jason,

please consider upgrade to Python 2.6.x when it happenes.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: python HTTPSHeader Error
« Reply #9 on: August 23, 2009, 04:56:22 PM »
JoXo009 - glad it is working!

bmarkus - Updating python will be no problem, I would even do it now if those who maintain the python dependent apps would not mind a rebuild of those extensions.  But I don't want to impose such a rebuild until next major version unless it is agreeable to those it would affect.  If folks would like to see a Python upgrade and don't mind rebuilding the several python  dependent extensions, then we can do that. 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: python HTTPSHeader Error
« Reply #10 on: August 23, 2009, 04:58:54 PM »
That's fine, I was referring to the mentioned next major release only. 2.5.2 is fine for most of us, nothing is pushing 2.6.2
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: python HTTPSHeader Error
« Reply #11 on: August 23, 2009, 08:33:38 PM »
I have no problem rebuilding any of my extensions to meet an updated python, I have build.sh scripts so it should be fairly easy to do  :)
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: python HTTPSHeader Error
« Reply #12 on: August 23, 2009, 09:54:15 PM »
Looks like if we hear from JLS about rebuilding the pygtk stuff then it may be a deal.  The python in the repo is right at a year old and once a year python update is reasonable.  And it would be kind of good to update python independent of a TC major version upgrade as those times are challenging enough.