egg

How can I make setuptools ignore subversion inventory?

ぐ巨炮叔叔 提交于 2019-12-04 10:03:00
问题 When packaging a Python package with a setup.py that uses the setuptools: from setuptools import setup ... the source distribution created by: python setup.py sdist not only includes, as usual, the files specified in MANIFEST.in, but it also, gratuitously, includes all of the files that Subversion lists as being version controlled beneath the package directory. This is vastly annoying. Not only does it make it difficult to exercise any sort of explicit control over what files get distributed

Python import library from tar.gz?

丶灬走出姿态 提交于 2019-12-04 08:49:30
I am working on a box which I don't have root access. However, there is a folder /share which would be accessed for everyone to read and write. I want to figure out a way to put python libraries so that everyone could access and use them. I figured out that I can put the egg file in the /share/pythonLib folder and in the python script. import sys sys.path.append("/share/pythonLib/foo.egg") import foo and it would work for everyone, however, I am not sure every library has egg version. For example, I am trying to install BeautifulSoup4 , however, there is only tar.gz file and I am not sure if

Create a python executable using setuptools

冷暖自知 提交于 2019-12-04 08:05:44
问题 I have a small python application that I would like to make into a downloadable / installable executable for UNIX-like systems. I am under the impression that setuptools would be the best way to make this happen but somehow this doesn't seem to be a common task. My directory structure looks like this: myappname/ |-- setup.py |-- myappname/ | |-- __init__.py | |-- myappname.py | |-- src/ | |-- __init__.py | |-- mainclassfile.py | |-- morepython/ | |-- __init__.py | |-- extrapython1.py | |--

How to prevent setuptools install package as an .egg

谁说我不能喝 提交于 2019-12-04 03:35:24
For example, installing IPython on Linux (where setuptools is not installed) I've got IPython installed in site-packages\IPython . Installing IPython on Windows (where IPython requires setuptools), after executing the same command python setup.py install I get IPython installed in site-packages\ipython-0.13.2-py2.7.egg\IPython Is there a way to install the module "old way" i.e. into site-packages\IPython ? I've discovered that python setup.py install --old-and-unmanageable does the job, but I am not sure it is a good way as --old-and-unmanageable is marked "Try not to use this!". I don't know

How does Python keep track of modules installed with eggs?

隐身守侯 提交于 2019-12-04 00:39:08
If I have a module, foo , in Lib/site-packages , I can just import foo and it will work. However, when I install stuff from eggs, I get something like blah-4.0.1-py2.7-win32.egg as a folder, with the module contents inside, yet I still only need do import foo , not anything more complicated. How does Python keep track of eggs? It is not just dirname matching as if I drop that folder into a Python installation without going through dist-utils, it does not find the module. To be clearer: I just installed zope. The folder name is "zope.interface-3.3.0-py2.7-win32.egg". This works: Python 2.7.1

How do I deactivate an egg?

拥有回忆 提交于 2019-12-03 20:46:02
I've installed cx_Oracle (repeatedly) and I just can't get it to work on my Intel Mac. How do I deactivate/uninstall it? You simply delete the .egg file On OS X they are installed into /Library/Python/2.5/site-packages/ - in that folder you should find a file named cx_Oracle.egg or similar. You can simple delete this file and it will be gone. One way of finding the file is, if you can import the module, simply displaying the repr() of the module: >>> import urllib >>> urllib <module 'urllib' from '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.pyc'> >>> import

What are the benefits and downsides of using the Python packaging *.egg format over a simple directory with setup.py?

一个人想着一个人 提交于 2019-12-03 19:40:41
When I release a program, I usually just create a setup.py and put it on pypi. It's installable with pip, I can always share it easily with others. It works for me, and apparently for a lot of people. I see the benefit of making an exe, a deb or a rmp to easy sysadmin. But I really don't see the point of using eggs. Can you tell me what can I gain from it ? I also once read that eggs had downsides, but I can't find the article anymore. Could you describe to me what problems using this packaging format can cause ? Please note that I did saw this question , but the answer is also applicable to a

Databricks (Spark): .egg dependencies not installed automatically?

左心房为你撑大大i 提交于 2019-12-03 17:07:19
问题 I have a locally created .egg package that depends on boto==2.38.0. I used setuptools to create the build distribution. Everything works in my own local environment, as it fetches boto correctly from PiP . However on databricks it does not automatically fetch dependencies when I attach a library to the cluster. I really struggled now for a few days trying to install a dependency automatically when loaded on databricks, I use setuptools; 'install_requires=['boto==2.38.0']' is the relevant

Why does easy_install extract some python eggs and not others?

不打扰是莪最后的温柔 提交于 2019-12-03 15:22:53
问题 Looking in my /usr/local/lib/python.../dist-package directory, I have .egg directories and .egg files. Why does the installer choose to extra packages to the .egg directory, yet leave other files with .egg extensions? 回答1: If the package contains only pure-Python code, it can stay as just an egg file. The Python interpreter can load the Python modules directly from the egg. If the package contains modules written in C or other data, then egg needs to be extracted so the C modules and/or data

pip: Why sometimes installed as egg, sometimes installed as files

点点圈 提交于 2019-12-03 12:07:18
Where can you force pip to install as "flat" and not as "egg". For me it seems random. Sometimes it gets installed as egg, sometime as flat. pip help install shows only an option --egg which forces an egg installation. But I could not find a --flat option. The packages are from an own pypiserver, and uploaded like this: python setup.py sdist upload -r internal Output of pip during install: Best match: foo-client 2015.2 Downloading https://installserver:40443/pypi/packages/foo_client-2015.2.tar.gz Processing foo_client-2015.2.tar.gz Writing /home/bar_eins_daad/tmp/easy_install-z20B7b/foo_client