setuptools

readthedocs and setuptools scm version wrong

落花浮王杯 提交于 2021-02-07 08:38:57
问题 I have a package I just updated to use setuptools_scm and found the version number is wrong in readthedocs. http://sshuttle.readthedocs.org/en/v0.77/ shows: Version: 0.78.dev0+ng083293e.d20160304 however as version 083293e has the 0.77 tag, the version string should be just 0.77 It looks like readthedocs might be making changes to my source code before building. I have looked at the readthedocs build logs, and it seems to have the correct version at one stage (0.77), however this is before it

Set setuptools to create cimportable package with headers availible

天大地大妈咪最大 提交于 2021-02-05 08:08:47
问题 I try to implement the answer https://stackoverflow.com/a/57480599/7482208, but I am stuck on cimporting one package from another. The code is here: https://github.com/iamishalkin/setuptools_cython_question What I want is to have one independent package wrap from wrapper folder such that you can use it without cust package. And I also want to be able to create custom functions by inheriting FuncWrapper class from wrap . What I do: Firstly I run python setup.py bdist_wheel in wrapper folder

Module found in install mode but not in develop mode using setuptools

耗尽温柔 提交于 2021-02-05 03:23:49
问题 I'm using setuptools for the first time, and trying to package my code so that others can easily develop it. I'm running everything in a virtual environment. Short question : How do I change the directory that the egg-link points to when I run python setup.py develop ? Long question : The module I'm developing is called cops_and_robots . When I run python setup.py install , things work fine and I'm able to import my cops_and_robots module. However, when I run python setup.py develop , running

Module found in install mode but not in develop mode using setuptools

爷,独闯天下 提交于 2021-02-05 03:21:14
问题 I'm using setuptools for the first time, and trying to package my code so that others can easily develop it. I'm running everything in a virtual environment. Short question : How do I change the directory that the egg-link points to when I run python setup.py develop ? Long question : The module I'm developing is called cops_and_robots . When I run python setup.py install , things work fine and I'm able to import my cops_and_robots module. However, when I run python setup.py develop , running

Is there any practical reason why I must have a code version embedded in python source code?

余生颓废 提交于 2021-02-04 13:51:41
问题 Is there any practical reason why I must have a code version embedded in the source code? Explicitly I'm interested in setup.py but also some use __version__ . By "embed in source code" I mean must I write the version number in as text in the file rather than populating python fields by other means. In other languages, I've set up the build scripts to be aware of git tags and then managed version numbers entirely through tags. This means that there is never a commit in the repo to "bump the

difficulties using setuptools to compile extension module

梦想的初衷 提交于 2021-01-29 19:33:50
问题 I am developing a package (module?) designed to be pip-installed. The package contains a C++ extension, wrapped using pybind11, which links to some other libraries. I am able to compile and link the extension libraries manually without issue, however I am unable to configure my setup.py file properly such that the extension module installs when invoking pip3 install my_package . I have been following this code (which is linked to by the pybind11 documentation) to configure my setup.py file,

Is there a possibility to pass start arguments to setup.py test

半世苍凉 提交于 2021-01-29 03:32:55
问题 I have a problem with the CI of my python project, the project is a python API which communicates with a server. To make it possible, to run builds concurrently I must have a possibility to pass the servers port to the python setup.py test command. For example python setup.py test --port 1337 . Is there any possibility to get this done? At the moment I have a setup.py file and use unittest for testing, but I'm totally free to use another framework like nose. The important thing is to pass the

How to install writable shared and user specific data files with setuptools?

和自甴很熟 提交于 2021-01-28 20:20:38
问题 I know package_data. But it is for readonly data inside the package. Or is this assumption wrong? How to install shared or user specific writeable data? For example to ProgramData or AppData on Windows. I'm interested in a solution for linux, too. 回答1: Your assumption seems right to me ( package data should be read-only ). For writable data: either let the user choose a target directory, or pick one directory according to a common convention. But this can not happen at install time . It's

Distutils ignores build/lib on Ubuntu

余生长醉 提交于 2021-01-28 13:41:55
问题 I have a setup.py script which builds files to be installed to the ./build/lib directory. The files are populated by the run() method of my custom distutils.command.build.build subclass: from distutils.command.build import build from distutils.core import setup class MyBuild(build): def run(self): # Populate files to ./build/lib setup( # ... cmdclass=dict(build=MyBuild) ) Now, according to this article the setup script should copy everything in the ./build/lib directory to the installation

On Plone 4.3.15, how to install latest Stripe's API

不问归期 提交于 2021-01-28 06:50:22
问题 On Plone 4.3.15 (Universal installation), it is not possible to install stripe 2.32.1. See logs : Getting distribution for 'stripe==2.32.1'. /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls' warnings.warn(msg) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg)