setup.py

correct setup.py for mixing Python and C++

亡梦爱人 提交于 2019-12-24 08:06:00
问题 I'm trying to mix both languages and I'm following the nice example provided by pybind here. I actually checked this post to improve on it so I can fall back to Python functions whenever a compiled function doesn't exist. The problem I have now is that my configure.py is not building the correct package. Let me develop: the structure of my code is something like this: $ tree . . ├── AUTHORS.md ├── CMakeLists.txt ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.md ├── conda.recipe │ ├── bld

setup.py - Symlink a module to /usr/bin after installation

风流意气都作罢 提交于 2019-12-24 04:27:19
问题 I've almost finished developing a python package and have also written a basic setup.py using distutils: #!/usr/bin/env python #@author: Prahlad Yeri #@description: Small daemon to create a wifi hotspot on linux #@license: MIT import cli #INSTALL IT from distutils.core import setup setup(name='hotspotd', version='0.1', description='Small daemon to create a wifi hotspot on linux', license='MIT', author='Prahlad Yeri', author_email='prahladyeri@yahoo.com', url='https://github.com/prahladyeri

install python package using setup.py

时光总嘲笑我的痴心妄想 提交于 2019-12-24 01:27:25
问题 I have create a python package, which runs fine with: python3 ~/Devel/mkbib/Python/src/main.py The file structure is: tree src/ src/ ├── main.py ├── menubar.ui ├── menu.py ├── mkbib.svg ├── pybib.py ├── __pycache__ │ ├── main.cpython-34.pyc │ ├── menu.cpython-34.pyc │ ├── pybib.cpython-34.pyc │ └── view.cpython-34.pyc └── view.py The main.py looks like (I don't know how much I should show, hence this is not a minimal one): import gi import sys import menu import view import pybib import

Pass command line arguments to nose via “python setup.py test”

怎甘沉沦 提交于 2019-12-23 16:30:11
问题 Package Settings I have built a Python package which uses nose for testing. Therefore, setup.py contains: .. test_suite='nose.collector', tests_require=['nose'], .. And python setup.py test works as expected: running test ... ---------------------------------------------------------------------- Ran 3 tests in 0.065s OK Running with XUnit output Since I'm using Jenkins CI, I would like to output the nose results to JUnit XML format: nosetests <package-name> --with-xunit --verbose However,

pip install from specific setup.py

人盡茶涼 提交于 2019-12-23 09:36:27
问题 I created a python 3.3 app on RedHat's Openshift cloud service. By default it has setup.py for my project. I'm learning Udemy course called "Build a SaaS app with Flask" (source code) Now I wanted to use python-click, as recommended by the course. It needs another setup.py for cli project; so to put that file in the project root folder, I renamed it to setup_cli.py . Now there are two files: setup.py and setup_cli.py . Pip install seems to automatically look into setup.py. # See Dockerfile in

correct way to find scripts directory from setup.py in Python distutils?

梦想与她 提交于 2019-12-23 08:33:34
问题 I am distributing a package that has this structure: mymodule: mymodule/__init__.py mymodule/code.py scripts/script1.py scripts/script2.py The mymodule subdir of mymodule contains code, and the scripts subdir contains scripts that should be executable by the user. When describing a package installation in setup.py , I use: scripts=['myscripts/script1.py'] To specify where scripts should go. During installation they typically go in some platform/user specific bin directory. The code that I

Include entire directory in python setup.py data_files

删除回忆录丶 提交于 2019-12-23 07:45:37
问题 The data_files parameter for setup takes input in the following format: setup(... data_files = [(target_directory, [list of files to be put there])] ....) Is there a way for me to specify an entire directory of data instead, so I don't have to name each file individually and update it as I change implementation in my project? I attempted to use os.listdir() , but I don't know how to do that with relative paths, I couldn't use os.getcwd() or os.realpath(__file__) since those don't point to my

conda build is omitting data file sub-directories, even though setup is including them

醉酒当歌 提交于 2019-12-23 02:32:09
问题 I'm using conda build with a Python project that includes documentation, via a MANIFEST.in file and the package_data option to setup() : In MANIFEST.in : recursive-include pybert/doc/_build/html * In setup.py : setup( name='PyBERT', version=pybert.__version__, packages=['pybert',], package_data={'pybert': ['doc/_build/html/*',]}, I'm finding that while setup includes the subdirectories of my html directory: (pybert) Davids-Air-2:PyBERT dbanas$ tar xjf ~/anaconda/conda-bld/noarch/pybert-2.4.1

Providing a custom command class to setup.py in a separately installed package

余生颓废 提交于 2019-12-23 01:54:11
问题 I am trying to create a python package that implements a custom command class for setuptools.setup() for use in other, unrelated packages' setup.py scripts. Ideally, I would like to be able to include this package in the setup_requires argument to setup() , and have the custom command class take effect before the remainder of the setup activities are performed. Does setup() provide a hook of some sort to support this use case? If not, how can I minimize the amount of boilerplate that has to

installing multiple python packages by single python file

╄→尐↘猪︶ㄣ 提交于 2019-12-23 01:45:08
问题 How to make a python file, which installs the mentioned python packages, on running that python file in console instead of installing packages one by one as we do by using pip I am also confused with setup.py is it same and if it is how to do please help 回答1: You can make one text file which has your name of package requirements. Like this is requirement.txt requests==2.7.0 selenium==3.4.3 Flask==0.10.1 retrying==1.3.3 then you can run it like pip install -r requirement.txt Note: Place this