Reply
Thread Tools
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#81
We're discussing the solutions without asking the most important person here. Aapo, what's your idea for handling these pycentral-created modules that exist in /usr/lib/python2.7 ?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following User Says Thank You to marmistrz For This Useful Post:
Posts: 18 | Thanked: 20 times | Joined on Jul 2008
#82
Originally Posted by marmistrz View Post
We're discussing the solutions without asking the most important person here. Aapo, what's your idea for handling these pycentral-created modules that exist in /usr/lib/python2.7 ?
A - If we think they should't exists, python2.7-minimal.preinst should abort installation
Code:
case "$1" in
    install)
        if [ -e /usr/lib/python2.7 ] && \
          [ ! -L /usr/lib/python2.7 ]; then
            echo "/usr/lib/python2.7 should not be a regoular directory before python2.7-minimal installation. Please clean it." 
            exit 1
        fi
B - Otherwise python2.7-minimal.preinst could preserve files
Code:
    case "$1" in
    install)
        if [ -e /usr/lib/python2.7 ] && \
          [ ! -L /usr/lib/python2.7 ]; then
            # /opt/python27/lib really shouldn't exists
            if [ -e /opt/python27/lib ]; then exit 1; fi 
            mkdir -p /opt/python27
            mv -i /usr/lib/python2.7 /opt/python27/lib
         fi
I vote for A :
- A is simpler and cleaner
- B could break something else, I fear (for example removal of a package with real files in /usr/lib/python2.7)
- my problematic case happende because there were files from a package who should (kindly) remove them.
- your case @marmistrz is for me not reproducible.


I'm still trying to complete python 2.7.8 packaging, btw (issues with multiarch)
 
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#83
And do you have modrana installed? Maybe the offending egg causes pycentral to create modules for 2.7?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Posts: 18 | Thanked: 20 times | Joined on Jul 2008
#84
Originally Posted by marmistrz View Post
And do you have modrana installed? Maybe the offending egg causes pycentral to create modules for 2.7?
I've modrana installed and I have only files of modrana in /usr/lib/python2.7.
I think your case is caused by the installation of a non optified version of python2.7. Possible ?
 
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#85
I installed no other python2.7 than from the repos. Look at wiki.maemo.org/User:Marmistrz for approximation of my setup and the list of packages pastebin somewhere in this thread.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Posts: 18 | Thanked: 20 times | Joined on Jul 2008
#86
I've packaged python 2.7.8 from jessie, if someone wants to test.
Installation stops if /usr/lib/python2.7 exists.

https://www.dropbox.com/sh/0k0bymmxp...HM7JnqcOa?dl=0

packaging repository is on github, if you want compile or see the diff from debian package
https://github.com/gaetano-guerriero/python27-maemo

A small issue is the missing of bsddb (maemo libdb is too old).
Anyway bsddb is deprecated, and we should hardly find something using it.
 

The Following 3 Users Say Thank You to wazrus For This Useful Post:
Posts: 838 | Thanked: 3,384 times | Joined on Mar 2009
#87
Unfortunately I have little to say. I think it will be best to use newest available python-2.7. (2.7.8 from Jessie sounds good). I also think that symlinking is cleaner way than mounting (as with python2.5).
 

The Following 5 Users Say Thank You to AapoRantalainen For This Useful Post:
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#88
I'm quite a python noob but I need python2.7, should I bother or go directly to 3.4: http://213.128.137.28/showthread.php?t=91777&page=3

Besides that, what's the best way to build/install a module for python2.7 or 3.4?
I need some third-party modules that aren't here yet, but I am not really familiar with python and it's modules but would like to make a try and if I succeed, the community is one module richer ^^
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 

The Following User Says Thank You to mr_pingu For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#89
mr_pingu,

there's a whole history behind the modules. The idea was to port most modules to 2.7/3.4. There's even a thread about it somewhere.

But.
But due to the Aapo's packaging, the debian provides were needed. I asked Aapo to add them but he seemingly had no time. The provides are missing even now (and their lack breaks some packages from the python3 source package)
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Posts: 16 | Thanked: 18 times | Joined on Jan 2012
#90
I get this trying to install latest setuptools:

Code:
-bash-4.2$ cd ~/MyDocs/setuptools-34.0.1
-bash-4.2$ sudo python2.7 setup.py install
Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    import setuptools
  File "/home/user/MyDocs/setuptools-34.0.1/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/home/user/MyDocs/setuptools-34.0.1/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 3018, in <module>
    @_call_aside
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 3002, in _call_aside
    f(*args, **kwargs)
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 3031, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 645, in _build_master
    ws = cls()
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 638, in __init__
    self.add_entry(entry)
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 694, in add_entry
    for dist in find_distributions(entry, True):
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 2018, in find_on_path
    path_item, entry, metadata, precedence=DEVELOP_DIST
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 2431, in from_location
    py_version=py_version, platform=platform, **kw
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 2771, in _reload_version
    md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 2396, in _version_from_file
    line = next(iter(version_lines), '')
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 2564, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 1871, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/home/user/MyDocs/setuptools-34.0.1/pkg_resources/__init__.py", line 1857, in get_metadata
    with io.open(self.path, encoding='utf-8', errors="replace") as f:
TypeError: 'errors' is an invalid keyword argument for this function
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 10:42.