setuptools

How to turn warnings into errors when building sphinx documentation with setuptools?

南楼画角 提交于 2020-07-06 08:22:14
问题 I am using setuptools to build my sphinx documentation of a python project ( python setup.py build_sphinx ). As found on, e.g., this site, I have configured the build process using the setup.cfg: [build_sphinx] source-dir = docs/source build-dir = docs/build all_files = 1 However, I would like to add some more options. Specifically, I would like to turn all warnings into errors, which would work with the sphinx-build command with the option -W : sphinx-build --help Sphinx v1.1.3 Usage: /usr

How to turn warnings into errors when building sphinx documentation with setuptools?

北战南征 提交于 2020-07-06 08:21:12
问题 I am using setuptools to build my sphinx documentation of a python project ( python setup.py build_sphinx ). As found on, e.g., this site, I have configured the build process using the setup.cfg: [build_sphinx] source-dir = docs/source build-dir = docs/build all_files = 1 However, I would like to add some more options. Specifically, I would like to turn all warnings into errors, which would work with the sphinx-build command with the option -W : sphinx-build --help Sphinx v1.1.3 Usage: /usr

Src layout to dispense .src prefix in imports? Activate venv in PyCharm terminal for development installs

隐身守侯 提交于 2020-06-29 03:13:17
问题 I want to understand what is considered the correct minimalist way to use setuptools with a "src/ layout" in a way that dispenses using src. prefix in imports? I have read most of the PyPA and setuptools documentation (and its many use cases), but I can't understand what is considered the correct way of doing this example. The below layout reproduces what I want to achieve. I can't understand how to get the second import to work instead of the first across all modules of the mylibrary package

Src layout to dispense .src prefix in imports? Activate venv in PyCharm terminal for development installs

本秂侑毒 提交于 2020-06-29 03:13:09
问题 I want to understand what is considered the correct minimalist way to use setuptools with a "src/ layout" in a way that dispenses using src. prefix in imports? I have read most of the PyPA and setuptools documentation (and its many use cases), but I can't understand what is considered the correct way of doing this example. The below layout reproduces what I want to achieve. I can't understand how to get the second import to work instead of the first across all modules of the mylibrary package

Add a custom wheel file as a dependency in setup.py?

大憨熊 提交于 2020-06-27 07:40:55
问题 I'm working on a project where one of the dependencies is actually a .whl that isn't on pypi (i.e. I had to download the wheel direct from the author and pip install it directly). In my setup.py file, is there a way to do something like: install_requires=[ 'library.whl', 'matplotlib==2.2.2', 'numpy==1.14.2', 'opencv-python==3.4.0.12', 'Pillow==5.1.0', 'PyYAML==3.12', ], Or something along these lines since its not on pypi (and I would just add the library.whl in the MANIFEST.in file or

How to register Entry Points for network python package installs?

*爱你&永不变心* 提交于 2020-06-27 07:11:19
问题 I have a user environment where most python packages are installed on a network share and are made available via the PYTHONPATH environment variable. Python itself is still installed locally. Some of those packages need to register setuptools Entry Points. Normally, this would happen by running the setup.py file for the package, but because these are installed to a network location, that setup.py is never run with the local installation of python. Is there a way to register Entry Points

RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment

て烟熏妆下的殇ゞ 提交于 2020-06-24 07:41:05
问题 I have Win 10 When running: conda update conda I encountered this error: RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment. Nothing seems to help I tried to uninstall anaconda and got a successful message but it seems there are some traces of older version that still persist How can I completely erase all traces of Anaconda installation? 回答1: While I still did not find how to cleanly uninstall anaconda, I was able to resolve the error

Installing dependency from a VCS repo subdirectory using setuptools

僤鯓⒐⒋嵵緔 提交于 2020-06-17 09:45:10
问题 I'm trying use setuptools to install a dependency from a VCS and inside a subdirectory. My setup.py looks like this: #!/usr/bin/env python3 from setuptools import setup required = [ "package" ] dependency_links = [ "git+ssh://git@host/repo.git@tag#subdirectory=subdir#egg=package-version" ] setup(install_requires=required, dependency_links=dependency_links) Running python3 setup.py install in a virtualenv, I get the following error: Download error on git+ssh://git@host/repo.git@tag

Dependencies auto discovery for Python setuptools?

这一生的挚爱 提交于 2020-06-17 03:56:27
问题 In packaging a Python application using setuptools , I am populating the install_requires list with all the PyPI dependencies of my application. I find myself manually combing through all my sources to find these. Is this the right way to do it? Or can this list be auto-populated somehow? 回答1: From my point of view install_requires should only list the direct dependencies of your project (not the indirect ones, the dependencies of your dependencies). So it often is a relatively short list,

Load shared object using ctyped.cdll.loadLibrary from dist-packages folder

风流意气都作罢 提交于 2020-06-15 07:39:41
问题 I created this setup.py to compile a libDIV.so shared library and install it. from distutils.core import setup, Extension libDIV = Extension( 'DIV', sources = ['example.c'] ) setup ( name = 'divv', version = '0.1', description = 'DIVV, you want it', ext_modules = [libDIV], packages = [''], package_data={'': ['libDIV.so']} ) After running python3 setup.py install , the shared library is placed in the dist-packages folder as: /usr/local/lib/python3.4/dist-packages/DIV.cpython-34m.so In an extra