Git Product home page Git Product logo

pythonext's Introduction

Python Extension (PythonExt) README
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduction
============

This provides instructions for setting up and building the PyXPCOM
extension from source.

Layout:
    build/                - scripts for creating pythonext.
    patches/              - specific pyxpcom/pydom patches that need be applied
    pybootstrap/          - sets up python and then pyxpcom libraries.
    pythonext_skeletion/  - framework for the pythonext extension.
    samples/              - examples using python in a mozilla extension.
    stub_pydom/           - loads the pydom component and necessary libraries.


How the extension works
=======================

The pybootstrap directory is copied into the mozilla/extensions directory and
the mozilla build is configured to compile this stub extension. The bootstrap is
responsible for loading the correct (internal) python library that will be
used by pyxpcom and pydom. The pybootstrap module will load the modified
pyxpcom loader component and then trigger the normal pyxpcom registration
process.

A pyxpcom registration helper is used "pyIXPCOMExtensionHelper.idl" to ensure
that *all* installed python xpcom extensions get registered and that the
python path is adjusted correctly for any of these extensions.

An extension that wants to add it's own python library code will need to
package the code into a pylib subdirectory of the extension xpi, this pylib
directory will automatically get added to sys.path at application startup.


Build process
=============

The Mozilla build requirements must already be met.

Mac OS X and Linux
------------------

Change to the build directory and then execute the build script:
$ ./build_pythonext.sh

If the build is successful, you will find an extension (xpi) file in the build
directory that can be installed into a Mozilla based application.


Windows
-------

In addition to the mozilla build requirements, you will also need to have the
"wget" executable available on your PATH.

Change to the build directory and then execute the build script:
$ ./build_pythonext.bat

If the build is successful, you will find an extension (xpi) file in the build
directory that can be installed into a Mozilla based application.


History
=======
This extension was previously called pyxpcomext when it was only using the
Python XPCOM bridging, but now that the extension also includes the Python
DOM handling code it was renamed to pythonext.


Contributors
============
* lekma - reworked the builds scripts and the pybootstrap code.
* Simon Kornblith - patches to pybootstrap and build scripts.

pythonext's People

Contributors

twhiteman avatar

pythonext's Issues

PythonExt 111220 not compatible with Firefox 11.0 beta channel

What steps will reproduce the problem?
1. Upgrade to Firefox 11 (beta channel)

What is the expected output? What do you see instead?

Using PythonExt with Zotero.  When I start Firefox, I get an error message 
saying PythonExt is not compatible.  I have "add-on compatibility checker" 
installed, but even with this I get the warning/error message.

What version of the product are you using? On what operating system?
FF 11.0 beta, on OS X 10.7.3

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 Feb 2012 at 7:41

firefox17 and firefox18 complie success but start up error!

1)
  c> start-msvc10.bat 
  # build for firefox17
  $ hg clone http://code.google.com/p/pythonext/ pythonext-hg
  $ cd pythonext-hg/build
  $ cmd /c build_pythonext.bat  
  # also build for firefox18 by change build_pythonext.py
  ...
  all successful!

2)install pythonext-18.0.1.20130126-WINNT_x86-msvc.xpi into firefox18.0.1

3)
  c> set NSPR_LOG_MODULES=nsNativeModuleLoader:5
  c> firefox -console

  Traceback (most recent call last):
  File "D:\dev2012\firefox\Data\profile\extensions\[email protected]\pylib\xpcom\server\__ini
t__.py", line 40, in <module>
    from policy import DefaultPolicy
  File "D:\dev2012\firefox\Data\profile\extensions\[email protected]\pylib\xpcom\server\polic
y.py", line 39, in <module>
    from xpcom import xpcom_consts, _xpcom, client, nsError, logger
<type 'exceptions.RuntimeError'>: Failed to find pyxpcom.dll
Creating an interface object to be used as a result failed

Traceback (most recent call last):
  File "D:\dev2012\firefox\Data\profile\extensions\[email protected]\pylib\xpcom\client\__ini
t__.py", line 41, in <module>
    from xpcom import xpt, COMException, nsError, logger
  File "D:\dev2012\firefox\Data\profile\extensions\[email protected]\pylib\xpcom\xpt.py", lin
e 72, in <module>
    import xpcom._xpcom
<type 'exceptions.RuntimeError'>: Failed to find pyxpcom.dll

when i see pyxpcom.dll, then
   c> dir [email protected]\pylib\
      pyxpcom.dll        133kb
      xpcom\xpcom.pyd    39kb

when i debug by import pdb;pdb.set_trace
 >>> import sys
 >>> sys.path    #include [email protected]\pylib\pyxpcom.dll directory
 >>> import xpcom._xpcom
 .... Failed to find pyxpcom.dll

this soft is greate work!
think you very much again!!!

Original issue reported on code.google.com by [email protected] on 26 Jan 2013 at 3:32

Outdated builds

Builds for pythonext are out-of-date.
You should build it also for 10 version of XulRunner.

Original issue reported on code.google.com by [email protected] on 7 Mar 2012 at 5:39

Xulrunner 10 segmentation error

What steps will reproduce the problem?
1. Build Pythonext with Xulrunner 10 and Python 2.6
2. Unzip the .xpi file in distribution/bundles/[email protected]
3. Launch the application

What is the expected output? What do you see instead?
The application can't start. A "segmentation fault" error message is shown.

What version of the product are you using? On what operating system?
Pythonext from HG, release-10.0.0, self-built, Linux 32bit

Please provide any additional information below.
GDB reports the segmentation fault in libxul.so.

Original issue reported on code.google.com by [email protected] on 24 Mar 2012 at 9:18

PythonExt not compatible with Firefox 30.0 on Linux Mint 17 (Ubuntu 14.04)

What steps will reproduce the problem?
1. Download the XPI
2. Try to install it from the file
3. See what FF says about it

What is the expected output? What do you see instead?
We would expect to have the XPI installed (and working).
Instead, FF says it cannot install this XPI because it is not compatible with 
the current version (30.0).

What version of the product are you using? On what operating system?
a) pythonext-6.0.0.20110820-Linux_x86-gcc3.xpi
b) Firefox 30.0
c) Linux Mint 17

Please provide any additional information below.
No additional info to supply

Original issue reported on code.google.com by [email protected] on 21 Jun 2014 at 7:10

PythonExt not working in Firefox 9.01 or 8.0

What steps will reproduce the problem?
1. install fails; message box "addon not compatible"

Is there any hope that there will be a release soon which is compatible with an 
up to date Firefox?

I think the problem is the new release cycle of Firefox. Can I make Firefox 
somehow believe that this addon is compatible?

Or is the really not compatible??

I need pythonex for Zotero.. with LibreOffice it was working well but now I 
have to work with Word since LibreOffice is too buggy.

Original issue reported on code.google.com by [email protected] on 2 Jan 2012 at 11:38

XulRunner 5.0 segmentation fault

My app does not start when i try to load the extension from application 
directory in windows or linux.

http://mozos.net/MozOS.6.zip


Original issue reported on code.google.com by [email protected] on 19 Jul 2011 at 10:03

Not able to compile the extension

What is the expected output? What do you see instead?

Trying to compile the extension I get this output in the terminal:
Building python extension
  platform: Linux-i686
  python version: 2.6.5 (r265:79063, Apr  6 2010, 10:10:07) 
self.platform: 'Linux-i686', url: 
'http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/7.0.1/sdk/xulrun
ner-7.0.1.en-US.linux-i686.sdk.tar.bz2'
Fordere alle Änderungen an
Füge Änderungssätze hinzu
Füge Manifeste hinzu
Füge Dateiänderungen hinzu
Fügte 102 Änderungssätze mit 300 Änderungen an 150 Dateien hinzu (+4 Köpfe)
Aktualisiere auf Zweig default
150 Dateien aktualisiert, 0 Dateien zusammengeführt, 0 Dateien entfernt, 0 
Dateien ungelöst
patching file configure.in
Hunk #1 succeeded at 4279 (offset 16 lines).
patching file xpcom/src/dllmain.cpp
Hunk #1 succeeded at 95 (offset -1 lines).
Hunk #2 succeeded at 109 with fuzz 1 (offset -1 lines).
Hunk #3 succeeded at 140 (offset -6 lines).
patching file Makefile.in
Traceback (most recent call last):
  File "build_pythonext.py", line 603, in <module>
    main()
  File "build_pythonext.py", line 592, in main
    build.build()
  File "build_pythonext.py", line 230, in build
    cwd=self.pyxpcom_dir)
  File "/home/marek/temp/pythonext/build/py_install/lib/python2.6/subprocess.py", line 493, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/home/marek/temp/pythonext/build/py_install/lib/python2.6/subprocess.py", line 480, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/home/marek/temp/pythonext/build/py_install/lib/python2.6/subprocess.py", line 633, in __init__
    errread, errwrite)
  File "/home/marek/temp/pythonext/build/py_install/lib/python2.6/subprocess.py", line 1139, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

What version of the product are you using? On what operating system?
I was trying to compile the release-7.0.1 on Fedora 15.

Original issue reported on code.google.com by [email protected] on 21 Oct 2011 at 12:35

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.