[nvda-addons] Re: NVDA and distutils?

  • From: James Scholes <james@xxxxxxxxxxxxx>
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Wed, 07 Jan 2015 12:30:07 +0000

Oriol Gómez wrote:
> I'm trying to code an addon which requires an external library.
> Is there a way for me to use setup.py in an NVDA addon, or do I need
> to make changes to the code and install it another way?

Just copy the library into your add-on's code directory and then do
something like:

import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
import some_lib

There is no need to use setup.py at all.
-- 
James Scholes
http://twitter.com/JamesScholes
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting 
bugs. 

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe: 
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

Other related posts: