distutils

Why does setup.py sweeps the content of the namespace before installing?

喜夏-厌秋 提交于 2019-12-01 04:58:35
问题 I'm using namespaces with setuptools to distribute a same module in two different repositories. The goal is to get mymodule.one and mymodule.two installed, knowing that the content of one and two comes from different repos. But it looks like two setup.py sweep each other content. ├── repo1 │ ├── mymodule │ │ ├── __init__.py │ │ └── one │ │ └── __init__.py │ └── setup.py └── repo2 ├── mymodule │ ├── __init__.py │ └── two │ └── __init__.py └── setup.py The namespace has the __init__.py below:

Unable to import distutils.dir_util on Windows

橙三吉。 提交于 2019-12-01 03:28:25
I'm trying to using distutils.dir_util on Windows 7 64bit. As far as I can glean from various googling, I may need to install some distutils package separately? I do have the base distutils package available, however it seems to be very stripped down and many components missing. Trying to research distutils and windows always leads me to python build scripts and how to package distutils as part of redistributable python projects or building EXEs which I'm not interested in, I simply can't see to get any traction on where to acquire this code from. It's been a long time, however I think I

Unable to import distutils.dir_util on Windows

依然范特西╮ 提交于 2019-12-01 00:00:11
问题 I'm trying to using distutils.dir_util on Windows 7 64bit. As far as I can glean from various googling, I may need to install some distutils package separately? I do have the base distutils package available, however it seems to be very stripped down and many components missing. Trying to research distutils and windows always leads me to python build scripts and how to package distutils as part of redistributable python projects or building EXEs which I'm not interested in, I simply can't see

Python module won't install

浪子不回头ぞ 提交于 2019-11-30 22:17:17
问题 This is my setup.py file #!/usr/bin/env python from setuptools import setup from sys import path setup(name= 'conundrum', version= '0.1.0', author= 'elssar', author_email= 'elssar@altrawcode.com', py_modules= ['conundrum'], url= 'https://github.com/elssar/conundrum', license= 'MIT', description= 'A framework agnostic blog generator.', long_description= open(path[0]+'/README.md', 'r').read(), install_requires= [ 'PyYAML >= 3.0.9', 'Markdown >= 2.2.0', 'requests >= 1.0.4', ], ) I have tried

How to run installed python script?

泪湿孤枕 提交于 2019-11-30 20:22:17
I used distutils to install my python package, with this setup.py : import distutils.core args = { 'name' : 'plugh', 'version' : '1.0', 'scripts' : [ "scripts/plugh" ], 'packages': [ "plugh" ], } d = distutils.core.setup( **args ) On linux/mac, it works as expected: % plugh hello world % On windows, the script "plugh" does not run: C:\Python25\Scripts>plugh 'plugh' is not recognized as an internal or external command, operable program or batch file. C:\Python25\Scripts> I found the bug report at http://bugs.python.org/issue7231 that the \Scripts directory is not added to PATH when you install

Running custom setuptools build during install

╄→尐↘猪︶ㄣ 提交于 2019-11-30 19:24:29
I've tried to implement Compass compiling during setuptools' build , but the following code runs compilation during explicit build command and doesn't runs during install . #!/usr/bin/env python import os import setuptools from distutils.command.build import build SETUP_DIR = os.path.dirname(os.path.abspath(__file__)) class BuildCSS(setuptools.Command): description = 'build CSS from SCSS' user_options = [] def initialize_options(self): pass def run(self): os.chdir(os.path.join(SETUP_DIR, 'django_project_dir', 'compass_project_dir')) import platform if 'Windows' == platform.system(): command =

LNK1181: cannot open input file 'm.lib'

我的未来我决定 提交于 2019-11-30 19:17:15
When trying to install a certain Python geophysical toolkit, I get this error: LINK : fatal error LNK1181: cannot open input file 'm.lib' I believe it is due to my use of the MSVC's buildtools. In their setup.py I found: setup(…, ext_modules=[ Extension(…, […], libraries=['m'], … ]) What do I need to change in this setup.py —and related files?—to make this work. IIRC there is a library other than m which I am to use. On Windows, the standard math functions are handled by MSVCR: >>> from ctypes.util import find_library >>> find_library('m') 'msvcr90.dll' I don't have MSVC installed to test, but

Python setup, install one module as a sub module of another module?

南笙酒味 提交于 2019-11-30 17:51:19
问题 I would like to create a package that installs into a submodule of another python package as an extension. Basically the original module is set up like so: origmodule/ __init__.py stuff.py ext/ __init__.py # This module is empty And then have my extension module installed into the empty origmodule.ext module. Reading the instructions for distutils it was not clear if this is possible or supported. The end goal is so that my extension module once installed would be imported like this: import

What is the graft command in Python's MANIFEST.in file?

夙愿已清 提交于 2019-11-30 17:23:26
I found a Python project with a MANIFEST.in file. I can guess at the meaning of much of it, but I am unclear on the meaning of the line: graft tools You can see such a file in JoshData/pdfminer/MANIFEST.in or openstack/deb-python-falcon/MANIFEST.in for instance. It is a python project which uses the MANIFEST.in template A MANIFEST.in file can be added in a project to define the list of files to include in the distribution built by the sdist command. When sdist is run, it will look for the MANIFEST.in file and interpret it to generate the MANIFEST file that contains the list of files that will

cxfreeze missing distutils module inside virtualenv

风格不统一 提交于 2019-11-30 17:14:46
问题 When running a cxfreeze binary from a python3.2 project I am getting the following runtime error: /project/dist/project/distutils/__init__.py:13: UserWarning: The virtualenv distutils package at %s appears to be in the same location as the system distutils? Traceback (most recent call last): File "/home/chrish/.virtualenvs/project/lib/python3.2/distutils/__init__.py", line 19, in <module> import dist ImportError: No module named dist Correspondingly there are several distutils entries in the