setuptools

How can I make pip install package data (a config file)?

南楼画角 提交于 2021-01-01 04:47:24
问题 I have a package called clana (Github, PyPI) with the following structure: . ├── clana │ ├── cli.py │ ├── config.yaml │ ├── __init__.py │ ├── utils.py │ └── visualize_predictions.py ├── docs/ ├── setup.cfg ├── setup.py ├── tests/ └── tox.ini The setup.py looks like this: from setuptools import find_packages from setuptools import setup requires_tests = [...] install_requires = [...] config = { "name": "clana", "version": "0.3.6", "author": "Martin Thoma", "author_email": "info@martin-thoma.de

How can I make pip install package data (a config file)?

最后都变了- 提交于 2021-01-01 04:47:05
问题 I have a package called clana (Github, PyPI) with the following structure: . ├── clana │ ├── cli.py │ ├── config.yaml │ ├── __init__.py │ ├── utils.py │ └── visualize_predictions.py ├── docs/ ├── setup.cfg ├── setup.py ├── tests/ └── tox.ini The setup.py looks like this: from setuptools import find_packages from setuptools import setup requires_tests = [...] install_requires = [...] config = { "name": "clana", "version": "0.3.6", "author": "Martin Thoma", "author_email": "info@martin-thoma.de

Should setuptools be in the setup_requires entry of setup.cfg files in Python?

南笙酒味 提交于 2020-12-30 06:18:23
问题 The importlib_resources backport for Python < 3.7 of the importlib.resources standard library module has the following section in the setup.cfg file: [options] python_requires = >=2.7,!=3.0,!=3.1,!=3.2,!=3.3 setup_requires = setuptools wheel install_requires = pathlib2; python_version < '3' typing; python_version < '3.5' packages = find: Why does setup_requires include setuptools ? This does not seem to make sense since: the first line of the setup.py file imports setuptools , so by the time

Should setuptools be in the setup_requires entry of setup.cfg files in Python?

烂漫一生 提交于 2020-12-30 06:17:49
问题 The importlib_resources backport for Python < 3.7 of the importlib.resources standard library module has the following section in the setup.cfg file: [options] python_requires = >=2.7,!=3.0,!=3.1,!=3.2,!=3.3 setup_requires = setuptools wheel install_requires = pathlib2; python_version < '3' typing; python_version < '3.5' packages = find: Why does setup_requires include setuptools ? This does not seem to make sense since: the first line of the setup.py file imports setuptools , so by the time

How to create a shortcut in startmenu using setuptools windows installer

喜你入骨 提交于 2020-12-29 06:37:14
问题 I want to create a start menu or Desktop shortcut for my Python windows installer package. I am trying to follow https://docs.python.org/3.4/distutils/builtdist.html#the-postinstallation-script Here is my script; import sys from os.path import dirname, join, expanduser pyw_executable = sys.executable.replace('python.exe','pythonw.exe') script_file = join(dirname(pyw_executable), 'Scripts', 'tklsystem-script.py') w_dir = expanduser(join('~','lsf_files')) print(sys.argv) if sys.argv[1] == '

Problems with entrypoints (from other packages) when installing package through pip

两盒软妹~` 提交于 2020-12-15 07:13:48
问题 Trying to install a package, for example, pytorch pip install torch / pip install -U torch And I'm greeted with this Collecting torch Using cached torch-0.1.2.post2.tar.gz (128 kB) ERROR: Command errored out with exit status 1: command: 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aissy\\AppData\\Local\\Temp\\pip-install-35x5kco9\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\aissy\\AppData\

Using git submodules with python

╄→尐↘猪︶ㄣ 提交于 2020-12-15 01:43:24
问题 I've read a lot of blog posts and questions on this site about the usage of git submodules and still have no idea how to better use them with python. I mean, what is the easier way to manage dependencies if I have such a package: ├── mypkg │ └── __init__.py ├── setup.py └── submodules ├── subm1 └── subm2 Then, what if I need to use "mypkg" as a submodule for "top_level_pkg": ├── setup.py ├── submodules │ └── mypkg └── top_level_package └── __init__.py , I want to run pip install . and have

Unexpected installation of GIT submodule

强颜欢笑 提交于 2020-12-15 00:44:11
问题 I have such project structure: ├── mypkg │ └── __init__.py ├── setup.py └── submodules └── subm ├── setup.py └── subm └── __init__.py And I need to install submodules/subm so it would be available in the VENV. I try to do it by calling "pip" in a subprocess. So I have such "setup.py" files: mypkg/setup.py : #!/usr/bin/env python import inspect import os import sys import subprocess import setuptools from setuptools.command.install import install from setuptools.command.develop import develop

Link f2py generated *.so file in a python package using setuptools

放肆的年华 提交于 2020-12-11 10:09:49
问题 I wish to deploy a package to PyPi using setuptools. However, the core part of the package is actually written in Fortran, and I am using f2py to wrap it in python. Basically the project's structure looks like this: my_project license.txt README.md setup.py my_project init .py myfunc.py hello.so The module myfunc.py imports hello.so ( import my_project.hello ) which can then be used by functions inside myfunc.py. This works perfectly on my machine. Then I tried standard setuptools

Link f2py generated *.so file in a python package using setuptools

柔情痞子 提交于 2020-12-11 10:08:33
问题 I wish to deploy a package to PyPi using setuptools. However, the core part of the package is actually written in Fortran, and I am using f2py to wrap it in python. Basically the project's structure looks like this: my_project license.txt README.md setup.py my_project init .py myfunc.py hello.so The module myfunc.py imports hello.so ( import my_project.hello ) which can then be used by functions inside myfunc.py. This works perfectly on my machine. Then I tried standard setuptools