简体   繁体   中英

setup.py, makefile… What I need?

I've been reading a lot these days, and I'm not sure about the specific use of it. I need ask it, because cannot find someone who explain it to me. Now I'm lost..

The main problem is I need install my app (python + glade) in "/usr/share/name_app" and a ".desktop" file in "/usr/share/applications" in Ubuntu.

The solution that I've find is creating a ".deb" file because the installation is perfect. In ubuntu I can launch it with Unity clicking on the launcher, the ".desktop". (Probably I'll upload it to "Ubuntu Software Center").

For windows I could use "py2exe" or a similar, and another one for Mac.

But, like the code is in GitHub, it should have a "setup" or a "makefile" to install it.

After reading and reading (and reading), I think that "setup.py" is only for install a module and then import it with python. However if I have to install and app, how can I distribute it making a "setup.py" or a "makefile"? Which is better for install an app? Which is the diference? What I have to use?

Thanks:)

setup.py is used to deploy Python applications and modules with virtualenv http://www.virtualenv.org/en/latest/index.html setup.py is mostly useful for the application developers - you can run

  python setup.py develop

within virtualenv to set-up your development workspace with Python dependencies.

For each platform distribution (Windows, OSX, Linux) use the distribution tools as you are currently using.

You can also use setuptools tools to roll out packages from setup.py for the platform architecture. Eg. creating .deb from setup.py

http://pypi.python.org/pypi/stdeb/

More info about setup.py

http://packages.python.org/distribute/setuptools.html

To grasp general concepts you could read stdlib docs: An Introduction to Distutils .

The first several links for keywords: "python packaging" are to: Python Packaging User Guide that should show what setup.py is and how to use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM