~ubuntu-branches/ubuntu/maverick/python3.1/maverick

« back to all changes in this revision

Viewing changes to debian/mkbinfmt.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-03-23 00:01:27 UTC
  • Revision ID: james.westby@ubuntu.com-20090323000127-mr2oo53y4j8vpldi
Tags: 3.1~a1+20090322-1
* Python 3.1 alpha1 release.
* Update to the trunk, 20090322.
* Update installation schemes: LP: #338395.
  - When the --prefix option is used for setup.py install, Use the
    `unix_prefix' scheme.
  - Use the `deb_system' scheme if --install-layout=deb is specified.
  - Use the the `unix_local' scheme if neither --install-layout=deb
    nor --prefix is specified.
* Use the information in /etc/lsb-release for platform.dist(). LP: #196526.
* pydoc: Fix detection of local documentation files.
* Build a shared library configured --with-pydebug. LP: #322580.
* Fix some lintian warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# mkbinfmt.py
 
2
import imp, sys, os.path
 
3
 
 
4
magic = "".join(["\\x%.2x" % c for c in imp.get_magic()])
 
5
 
 
6
name = sys.argv[1]
 
7
 
 
8
binfmt = '''\
 
9
package %s
 
10
interpreter /usr/bin/%s
 
11
magic %s\
 
12
''' % (name, name, magic)
 
13
 
 
14
#filename = '/usr/share/binfmts/' + name
 
15
#open(filename,'w+').write(binfmt)
 
16
 
 
17
sys.stdout.write(binfmt)
 
18
sys.stdout.write('\n')