WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Python extension is too big  (Read 3707 times)

Offline eno

  • Jr. Member
  • **
  • Posts: 54
Python extension is too big
« on: December 10, 2014, 04:53:59 PM »
Im building a minimal headless server but some extensions require Python to be installed and Python seems to have a dependency on tk which in turn pulls in X and bunch of other stuff I dont need/want. Is it possible to build a more minimal Python that doesn't have dependencies on X?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Python extension is too big
« Reply #1 on: December 11, 2014, 03:41:58 AM »
No plan to make a lite Python version. I will make tk a soft dependency in the repo however to make tcl/tk and X optional. In case Python already installed, you can edit your python.tcz.dep file and delete tcl/tk packages.

Also you can repack python.tcz for your own use deleting unneded modules but it do not have too much sense as they are loop mounted and saving few megabytes of SD card today give nothing. But of cource, you can do it :)

Béla
Ham Radio callsign: HA5DI

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

Offline eno

  • Jr. Member
  • **
  • Posts: 54
Re: Python extension is too big
« Reply #2 on: December 11, 2014, 12:57:59 PM »
How to build from source without tk? I dont see a configure option to build without tk...

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Python extension is too big
« Reply #3 on: December 11, 2014, 03:13:43 PM »
How to build from source without tk? I dont see a configure option to build without tk...

For generic Python build support better to use upstream forums, mailing lists, Google, etc.

Béla
Ham Radio callsign: HA5DI

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

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Python extension is too big
« Reply #4 on: December 14, 2014, 08:12:30 PM »
I found the same thing, Python plus a server takes up a lot of MB.
What extensions do you need?

I dropped Python due to reliability problems running 24/7.
Moved to shell scripts and busybox-httpd.
The only tcz extras I needed were busybox-httpd.tcz and i2ctools.tcz
As a side effect I learned lots about core Linux stuff in the process.

Can do quite a bit with shell scripts, cron and watch.
I generate the index.html file from scripts and busybox-httpd serves it.

For fancier web pages I will probably move to Nodejs and Javascripting.

Offline eno

  • Jr. Member
  • **
  • Posts: 54
Re: Python extension is too big
« Reply #5 on: December 16, 2014, 03:45:55 PM »
I found the same thing, Python plus a server takes up a lot of MB.
What extensions do you need?

Mercurial needs Python to build :-)

I think it would be nice to have a very minimal Python so Im building from source for my own use. I got some help on Stackoverflow regarding build configurations. If anyone else thinks it might be useful to make available, Ill happily submit an extension.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Python extension is too big
« Reply #6 on: December 16, 2014, 04:17:20 PM »
As I already wrote, no need to rebuild. Just do not install all dependencies and/or remove unneded modules from the tcz. It's easy, simple remastering.
Béla
Ham Radio callsign: HA5DI

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