setuptools

Cythonize but not compile .pyx files using setup.py

拥有回忆 提交于 2020-03-22 04:35:08
问题 I have a Cython project containing several .pyx files. To distribute my project I would like to provide my generated .c files as recommended in the Cython documentation, to minimize problems with different Cython versions. My current work flow is to build the project using: me@machine$ python setup.py build_ext --inplace This cythonizes (i.e. translate .pyx files to .c / .cpp files using Cython) all .pyx files and then compiles them. For a release I do not need the compiled ( .so ) files, so

Installing numpy before using numpy.distutils.core.setup

匆匆过客 提交于 2020-03-20 12:46:48
问题 I am using numpy.distutils to setup a package (mypackage) that has a frotran module. The problem is that if I do pip install mypackage on an environment that does not have numpy, I get the following error: ModuleNotFoundError: No module named 'numpy' The easy solution is to ask users (if I manage to have any) to pip install numpy before they install my package, but I do not think this is a very elegant solution. I came up with the idea of calling setuptools.setup with only setup_requires=[

RuntimeError: setuptools >= 41 required to build

我只是一个虾纸丫 提交于 2020-03-19 12:05:23
使用命令python setup.py install 安装第三方库报RuntimeError: setuptools >= 41 required to build 原因setuptools版本太低,需升级 1、在线升级命令 pip install --upgrade setuptools 2、离线升级,下载离线包,使用pip install + file进行安装 来源: https://www.cnblogs.com/mian-1122/p/12522096.html

Can conda install source distributions?

跟風遠走 提交于 2020-03-18 11:24:06
问题 Can conda install be used to install source-distributions (i.e. non-archived import packages that have a setup.py )? 回答1: Yes and no. You can not conda install per se. However, as the Conda documentation says, Conda ships with pip, so you should be able to pip install -e . your package. You can also install with traditional python setup.py [install|develop] . Remember to activate your Conda environment before installation if you're using one instead of site packages. 回答2: As mentioned by

用Setuptools构建和分发程序包

旧巷老猫 提交于 2020-03-17 01:21:36
目录 使用Setuptools构建和分发软件包 开发人员指南 安装setuptools 基本使用 指定项目的版本 新增和更改的setup()关键字 包括数据文件 参考示例 使用Setuptools构建和分发软件包 参考 官方文档 翻译 开发人员指南 安装setuptools 安装最新版本的setuptools: python3 -m pip install --upgrade setuptools 基本使用 引入setuptools基本使用 from setuptools import setup, find_packages setup( name="HelloWorld", version="0.1", packages=find_packages(), ) 要生成源代码分发,只需调用: setup.py sdist 随着项目的增大将会包括一些依赖项,以及一些数据文件和脚本: from setuptools import setup, find_packages setup( name="HelloWorld", version="0.1", packages=find_packages(), scripts=["say_hello.py"], # Project uses reStructuredText, so ensure that the docutils get #

CentOS 搭建 nginx python django web server

…衆ロ難τιáo~ 提交于 2020-03-16 18:44:54
参考:   1. http://www.cnblogs.com/geekma/archive/2013/02/22/2921952.html     #2.6 : python ez_setup.py -U setuptools     #3.2 ez_setup.py       wget https://bitbucket.org/pypa/setuptools/raw/0.7.6/ez_setup.py -O - | python       地址:https://pypi.python.org/pypi/setuptools/0.7.6#installation-instructions /usr/local/python3/bin/pip install SCons==2.3.0 wget https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.6.tar.gz --no-check-certificate     ip install -U mongoengine   2. http://wangye.org/blog/archives/570/   3. http://developer.51cto.com/art/201010/229615.htm   4. http://os

Python packaging of weakly dependent projects

五迷三道 提交于 2020-03-15 05:51:36
问题 I am trying to figure out a good way to package and deploy a number of python packages I created. Eventually, I would like to use some package repository for deployment or create some sort of setup script. The structure of my project is as follows: I have two subprojects A and B that both use tools from another self-created package C . The tools in C are for internal use only and not of bigger interest to a general audience. However, A and B shall be deployed. I want that users can install A

Python packaging of weakly dependent projects

旧巷老猫 提交于 2020-03-15 05:51:06
问题 I am trying to figure out a good way to package and deploy a number of python packages I created. Eventually, I would like to use some package repository for deployment or create some sort of setup script. The structure of my project is as follows: I have two subprojects A and B that both use tools from another self-created package C . The tools in C are for internal use only and not of bigger interest to a general audience. However, A and B shall be deployed. I want that users can install A

setuptools python setup.py install not copying all child modules

蹲街弑〆低调 提交于 2020-03-14 05:49:49
问题 The package dir structure is this repodir/ -------- setup.py -------- MANIFEST.in -------- bin/ ----------- awsm.sh -------- sound/ ------------ init.py ------------ echo/ ----------------- init.py ----------------- module1.py ----------------- module2.py ------------ effects/ ------------------- init.py ------------------- module3.py ------------------- module4.py setup.py from setuptools import setup setup( name = 'sound', version = '0.1', author = 'awesomeo', author_email = 'awesomeo@email

pycharm导包错误处理办法

给你一囗甜甜゛ 提交于 2020-03-12 07:47:51
今天写了一个项目,从虚拟机里面到出到物理机里面重新验证的时候导入requirements.txt里面的包报错,然后搜索一大堆,然后升级一堆东西,没用.于是又从报错代码入手,下面是报错代码↓↓↓↓↓ Command “python setup.py egg_info” failed with error code 1 in C:\Users\xxhaa\AppData\Local\Temp\pip-install-0eis_4zw\django-haystack\ 翻译过来没什么用这个代码,于是从最开始的错误地方开始.代码如下 Complete output from command python setup.py egg_info: Download error on https://pypi.org/simple/setuptools_scm/: ssl.c:761: The handshake operation timed out – Some packages may not be found! Download error on https://pypi.org/simple/setuptools-scm/: The read operation timed out – Some packages may not be found! Couldn’t find index