0
votes

I have created a simple python module with SWIG (from C++). It is in the form of a .pyd file and a .py file.

I want to be able to give this module to my colleagues so they can install and use it.

I am aware that python modules are often installed using:

python setup.py install

Perhaps this is the functionality I want, so that my colleagues can run this module from anywhere without worrying about PATH etc.

I also would like to be able to send them an updated module from time to time, which will overwrite the older version when they install it.

How do I go about this?

1

1 Answers

0
votes

As far as I can understand this question, you want a setup.py file to install your module go through the steps given below :

  1. create a directory on Desktop (name it "source" for example)
  2. put your .py and .pyc files in it.
  3. go to Desktop and create setup.py file and enter the following code

as

from distutils.core import setup

setup(name='Some_name',
version='1.0',
author='Author_name',
author_email='[email protected]',
packages=['source']
)

4. To use it in any program.

import module_name from source

hope this helps !