setup.py

How may I override the compiler (gcc) flags that setup.py uses by default?

ⅰ亾dé卋堺 提交于 2019-11-26 08:06:21
问题 I understand that setup.py uses the same CFLAGS that were used to build python. I have a single C extension of ours that is segfaulting. I need to build it without -O2 because -O2 is optimizing out some values and code so that the core files are not sufficient to pin down the problem. I just need to modify setup.py so that -O2 is not used. I\'ve read distutils documentation, in particular distutils.ccompiler and distutils.unixcompiler and see how to add flags and libs and includes, but not

Post-install script with Python setuptools

别说谁变了你拦得住时间么 提交于 2019-11-26 07:32:50
Is it possible to specify a post-install Python script file as part of the setuptools setup.py file so that a user can run the command: python setup.py install on a local project file archive, or pip install <name> for a PyPI project and the script will be run at the completion of the standard setuptools install? I am looking to perform post-install tasks that can be coded in a single Python script file (e.g. deliver a custom post-install message to the user, pull additional data files from a different remote source repository). I came across this SO answer from several years ago that

Post-install script with Python setuptools

心已入冬 提交于 2019-11-26 05:49:12
问题 Is it possible to specify a post-install Python script file as part of the setuptools setup.py file so that a user can run the command: python setup.py install on a local project file archive, or pip install <name> for a PyPI project and the script will be run at the completion of the standard setuptools install? I am looking to perform post-install tasks that can be coded in a single Python script file (e.g. deliver a custom post-install message to the user, pull additional data files from a

Python 3: ImportError “No Module named Setuptools”

自古美人都是妖i 提交于 2019-11-26 02:06:52
问题 I\'m having troubles with installing packages in Python 3. I have always installed packages with setup.py install . But now, when I try to install the ansicolors package I get: importerror \"No Module named Setuptools\" I have no idea what to do because I didn\'t have setuptools installed in the past. Still, I was able to install many packages with setup.py install without setuptools. Why should I get setuptools now? I can\'t even install setuptools because I have Python 3.3 and setuptools

error: Unable to find vcvarsall.bat

半城伤御伤魂 提交于 2019-11-26 01:18:14
问题 I tried to install the Python package dulwich: pip install dulwich But I get a cryptic error message: error: Unable to find vcvarsall.bat The same happens if I try installing the package manually: > python setup.py install running build_ext building \'dulwich._objects\' extension error: Unable to find vcvarsall.bat 回答1: Update : Comments point out that the instructions here may be dangerous. Consider using the Visual C++ 2008 Express edition or the purpose-built Microsoft Visual C++ Compiler

What is setup.py?

£可爱£侵袭症+ 提交于 2019-11-26 00:29:31
问题 Can anyone please explain, what is setup.py and how can it be configured or used? 回答1: setup.py is a python file, which usually tells you that the module/package you are about to install has been packaged and distributed with Distutils, which is the standard for distributing Python Modules. This allows you to easily install Python packages. Often it's enough to write: $ pip install . pip will use setup.py to install your module. Avoid calling setup.py directly. https://docs.python.org/3