setup.py

Unable to create bdist_egg in pycharm - error: package directory 'venv\Lib\site-packages\pip-10\0\1-py3\6\egg\pip' does not exist

北城余情 提交于 2019-12-23 01:43:29
问题 Running the bdist_egg through PyCharm fails with the error - error: package directory 'venv\Lib\site-packages\pip-10\0\1-py3\6\egg\pip' does not exist I noticed that the setup.py contains venv.Lib.site-packages.pip-10.0.1-py3.6.egg.pip However, I find the following package available in path venv/Lib/site-packages/pip-10.0.1-py3.egg/pip . 来源: https://stackoverflow.com/questions/50996346/unable-to-create-bdist-egg-in-pycharm-error-package-directory-venv-lib-site

pip installation throws IOerror - no setup.py

岁酱吖の 提交于 2019-12-23 01:01:33
问题 I'm packaging my project via setup.py of a following structure: import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "blah", version = "0.0.1", author = "Chuck Norris", author_email = "xyz@gmail.com", description = ("blah blah blah."), license = "BSD", keywords = "django", url = "http://packages.python.org/blah", packages=['blah'], long_description=read('README'), classifiers=[ "Development Status :: 3 - Alpha

distutils ignores changes to setup.py when building an extension?

时间秒杀一切 提交于 2019-12-22 07:42:36
问题 I have a setup.py file that builds an extension. If I change one of the source files, distutils recognizes this and rebuilds the extension, showing all the compile / link commands. However, if the only thing I change is setup.py (I'm fiddling trying to make library dependencies work), then it doesn't seem to rebuild (e.g., none of the compile/link commands show up). I've tested this by removing one of the source files in the line sources = ['foo.c', 'bar.c' ...] and when I pip install -e . or

How to Build a 32-bit Python Module Distribution w/ Setup.py on x86_64 Host

≡放荡痞女 提交于 2019-12-21 20:28:46
问题 I need to compile a 32-bit distribution of PyEphem. It does not seem like this should be difficult, however, I'm running into some compiler issues. $ CFLAGS=-m32 python setup.py bdist -p i386 running bdist running bdist_dumb running build running build_py running build_ext building 'ephem._libastro' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -m32 -fPIC -Ilibastro-3.7.3 -I/usr/include/python2.6 -c extensions/_libastro.c -o build/temp.linux-x86

How to chmod files within a python setup.py?

非 Y 不嫁゛ 提交于 2019-12-21 20:25:11
问题 I created a python package installation with a setup.py, and i want it to copy a data file in the folder (created for the occasion) ~/.did. The problem is that i have to call setup.py with sudo rights, as it writes in /usr/local/... So when my data file is copied in ~/.did, only the root user has write access to the file. I decided then to add a call to os.chmod() after the setup() function, but i'd like to know if anyone had a more clean way to do so. Here is my setup.py file : #!/usr/bin

setup.py check if non-python library dependency exists

旧街凉风 提交于 2019-12-21 17:06:32
问题 I'm trying to make a setup.py for cgal-bindings. To install this, the user needs to have at least a certain version of CGAL. In addition, CGAL has a few optional targets that should be built if the user has some libraries (like Eigen3). Is there a cross-platform way in Python to check for this? I can use find_library in ctypes.util to check if the library exists, but I don't see any easy way to get the version . <-- This doesn't actually work all the time, some libraries are header-only like

setuptools: data files included with `bdist` but not with `sdist`

爱⌒轻易说出口 提交于 2019-12-21 09:14:34
问题 I've got a setup.py file which looks like this: #!/usr/bin/env python from setuptools import setup, find_packages setup( name="foo", version="1.0", packages=find_packages(), include_package_data=True, package_data={ "": ["*"], }, ) And a package foo which looks like this: foo/__init__.py foo/bar.txt When I run setup.py bdist , the bar.txt file is (correctly) included in the distribution… But when I use setup.py sdist it isn't. What's up with that? Am I misunderstanding the meaning of package

setup.py: require a recent version of setuptools before trying to install

爱⌒轻易说出口 提交于 2019-12-21 05:31:20
问题 I'm creating a package that has 'typing;python_version<"3.5"' in it's install_requires . Apparently, this kind of dependency specification has only been implemented in recent versions of setuptools . If the setuptools on the user's machine is old they'll get: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in typing;python_version<"3.5" at ;python_version<"3.5" The easy solution is to tell the users to pip

Why is dependency links in setup.py deprecated?

↘锁芯ラ 提交于 2019-12-21 04:35:15
问题 There are quite a few people wondering for an alternative to dependency links in the setup.py (activated with the pip flag --process-dependency-links ): What is the alternative to using --process-dependency-links with pip, Depend on git repository in setup.py. Basically, I got bitten by the deprecation warning: "DEPRECATION: Dependency Links processing has been deprecated and will be removed in a future release." Some people have suggested using requirements.txt , however that is not an

add data files to python projects setup.py

ε祈祈猫儿з 提交于 2019-12-21 03:35:50
问题 I have a project like this: ├── CHANGES.txt ├── LICENSE ├── MANIFEST.in ... ├── docs │ └── index.rst ├── negar │ ├── Negar.py │ ├── Virastar.py │ ├── Virastar.pyc │ ├── __init__.py │ ├── data │ │ ├── __init__.py │ │ └── untouchable.dat │ ├── gui.py │ ├── gui.pyc │ ├── i18n │ │ ├── fa_IR.qm │ │ └── fa_IR.ts │ └── negar.pro ├── setup.py ... and inside that my file Virastar.py need some data from data.untouchable.dat . it works fine until I install the project with this setup.py : setup( ...