<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Python AddIn: How can I package/deploy a custom lib with my python addin? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-addin-how-can-i-package-deploy-a-custom-lib/m-p/363969#M28795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a couple custom .py modules that live in my C:\Python27\ArcGIS10.1\Lib directory.&amp;nbsp; I "import" these into all my tools (mainly custom utils that I use alot).&amp;nbsp; I've created a python addin.esriaddin, using the wizard and customized it to use the tools from my custom toolbox.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the addin creation, I've copied the .py file from these modules into the \addin\Install folder, so they do get included with my addin package, but on install to a new machine, they do not get deployed to the \Lib directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to do this that I am missing?&amp;nbsp; Or should I call the in my script tools using relative paths to the \addin\Install folder.&amp;nbsp; I'm just not sure how this would be referenced when installed on a different computer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone done this or have any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;---------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UGH...never mind.&amp;nbsp; I just moved them to the folder with my other scripts (i.e. addin\Install\scripts in my case).&amp;nbsp; Since my tool scripts do not specify a folder, it appears it first looks in the current folder of the calling script, before or if it doesn't find it in the \lib folder.&amp;nbsp; In any case it worked for this addin.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I should have checked that before posting...but if this helps someone else....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 May 2013 21:46:16 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2013-05-08T21:46:16Z</dc:date>
    <item>
      <title>Python AddIn: How can I package/deploy a custom lib with my python addin?</title>
      <link>https://community.esri.com/t5/python-questions/python-addin-how-can-i-package-deploy-a-custom-lib/m-p/363969#M28795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a couple custom .py modules that live in my C:\Python27\ArcGIS10.1\Lib directory.&amp;nbsp; I "import" these into all my tools (mainly custom utils that I use alot).&amp;nbsp; I've created a python addin.esriaddin, using the wizard and customized it to use the tools from my custom toolbox.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the addin creation, I've copied the .py file from these modules into the \addin\Install folder, so they do get included with my addin package, but on install to a new machine, they do not get deployed to the \Lib directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to do this that I am missing?&amp;nbsp; Or should I call the in my script tools using relative paths to the \addin\Install folder.&amp;nbsp; I'm just not sure how this would be referenced when installed on a different computer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone done this or have any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;---------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UGH...never mind.&amp;nbsp; I just moved them to the folder with my other scripts (i.e. addin\Install\scripts in my case).&amp;nbsp; Since my tool scripts do not specify a folder, it appears it first looks in the current folder of the calling script, before or if it doesn't find it in the \lib folder.&amp;nbsp; In any case it worked for this addin.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I should have checked that before posting...but if this helps someone else....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 21:46:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-addin-how-can-i-package-deploy-a-custom-lib/m-p/363969#M28795</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2013-05-08T21:46:16Z</dc:date>
    </item>
  </channel>
</rss>

