setup.py

Create editable package setup.py in the same root folder as __init__.py

☆樱花仙子☆ 提交于 2019-12-11 17:18:57
问题 An existing project is setup in a way that the repository has an __init__.py in at the root folder. I would like to create a setup.py in the repository so this would be the resulting project structure: project-master/ ├── __init__.py ├── setup.py └── submodule1 ├── code.py └── __init__.py └── submodule2 ├── code.py └── __init__.py and you should be able to: git clone project.url cd project-master pip install -e . from project.submodule1 import ... I tried the hacky solution of temporarily

Change output directory in setup.py

≡放荡痞女 提交于 2019-12-11 17:06:47
问题 I'm using setup from setuptools to create a setup.py , and I was wondering if it's possible to change the output directory programmatically to change it from dist/ . I'm aware that you can do this from the command line using the --dist-dir flag, but I want to be able to do from within the setup.py file instead. Anyone have any ideas? 回答1: You need to override code that set the default name: from distutils.command.bdist import bdist as _bdist from distutils.command.sdist import sdist as _sdist

setup.py is not creating executable

℡╲_俬逩灬. 提交于 2019-12-11 12:39:37
问题 I have created this minimal setup.py using https://github.com/pypa/sampleproject 's sample setup.py . This is my first encounter with setup.py system. The end result is: with open(path.join(here, 'README'), encoding='utf-8') as f: long_description = f.read() setup( name='mkbib', version='0.1', description='BibTeX Creator', author='Rudra Banerjee', author_email='bnrj.rudra@gmail.com', license='GPLv3', keywords='BibTeX', packages=find_packages(exclude=['contrib', 'docs', 'tests']), install

How can I incorporate cmake file when building with distutils python?

我与影子孤独终老i 提交于 2019-12-11 12:14:12
问题 I have a C++ logic which I'm calling from Python. I have created a setup.py using distutils to build and install. The C++ logic has a cmake file. To build the C++ this cmake file needs to be incorporated into the setup.py file. How can I do this? Below is my cmake file for the C++ code. CMAKE_MINIMUM_REQUIRED(VERSION 2.6) set(name "facerec") project(facerec_cpp_samples) #SET(OpenCV_DIR /path/to/your/opencv/installation) # packages find_package(OpenCV REQUIRED) # http://opencv.willowgarage.com

Where to start looking in the code when your .exe doesn't work after cx_freeze?

↘锁芯ラ 提交于 2019-12-11 07:17:05
问题 So I've been working a while on a tkinter program that kills windows explorer and pulls up a dialogue box with an image, button, and canvas. So I got the python script itself to work. But when I try to compile it with cx_Freeze for use on my other 64 bit windows computer, and then run it, nothing happens. No errors, no dialogue messages, nothing. Just a loading animation over the cursor for a few seconds before it stops. I made a batch file that pauses the application before it finishes in

Cx_Freeze build is not including python libraries in zip file

拈花ヽ惹草 提交于 2019-12-11 06:24:14
问题 I'm in trouble with cx_Freeze 5.0 I'm working on: Windows 10 LTSB x64 Python 3.4.4 x86 PyQt5 PyWin32 x86 I never had any issue with this process until I reinstall my Windows10 installation... it was working great and now I can't figured it out why it's happening ... When I Freeze my python app (python setup.py build) script is copying the whole python libraries outside the python34.zip. The only thing I got inside python34.zip is *.pyc files (only this.. but a lot) I don't know why it doesnt

I cannot find setup.py in my OSX babel installation to import the cldr babel files, what am I doing wrong?

柔情痞子 提交于 2019-12-11 04:27:33
问题 I have been trying to use babel on my iMac (OSX Mavericks, I installed python and babel using MacPorts) but I get this error message : [...] writing PO template file to ./locale/messages.pot Traceback (most recent call last): File "/usr/local/bin/pybabel", line 8, in <module> load_entry_point('Babel==2.0-dev-20131218', 'console_scripts', 'pybabel')() File "/Library/Python/2.7/site-packages/Babel-2.0_dev_20131218-py2.7.egg/babel/messages/frontend.py", line 1151, in main return

ImportError on Cython submodule

坚强是说给别人听的谎言 提交于 2019-12-11 02:54:47
问题 I don't understand how to make Cython correctly build a single .pyd out of a module with submodules. The current setup.py gives me import error on the submodule. I have the setup given below the rule, and I move both cythontest.pyd and submod.pyd to another folder and start the interpreter there. Unfortunately I get this error: Traceback (most recent call last): File "<string>", line 1, in <module> File "__init__.py", line 1, in init cythontest (cythontest\__init__.c:981) ImportError: No

How to use `pip` and setup.py to automatically install dependencies that may be private repositories hosted on github

拈花ヽ惹草 提交于 2019-12-11 02:27:04
问题 I don't think this is a dupicate, because I tried all links I could find for the past 2 hours and none of the solutions worked. I want the user to be able to clone a repository, cd into the directory, and run $ pip install . (or at least pip install --process-dependency-links . ) to install the package, its pypi dependencies AND its (latest) private github dependencies assuming the user has read permissions for them. (also the devs should be able to run $ pip install -e . ) my setup.py :

Django's manage.py shows old commands

断了今生、忘了曾经 提交于 2019-12-11 01:59:43
问题 I am coding my own whl-package and after creating some new management-commands and deleting some old ones I was pretty happy with myself. Except after building my wheel-package (with setup.py bdist_wheel ) and installing it on my test server (with pip install -U project-2.0b3-py2.py3-none-any.whl ), I noticed that the help of manage.py still show the old commands. It will even try to run the old commands, so there is some old stuff there, but I was not quite sure why or how. I tried