Re: [Distutils] PEP439 and upgrading pip
1. We should write the bootstrapped pip to the same location that we're installing the package to (so system global, user local or current venv). this makes sense for global and user installs, but not venv? when you're in a venv, you're using the pip installed in that specific venv, not the bootstrap. and just to confirm about user install bootstrapping, it would work like this? - user1 happens to run pip3 install --user django as his first pip3 command - the bootstrap installs pip to /home/user1/.local - thereafter, user1's executions of pip3 detects the importable pip in user local, and does no more bootstrapping - user2 runs pip3 install --user django as his first pip3 command - the bootstrap installs pip to /home/user2/.local ... and if instead user1 ran sudo pip install django as his first command, pip get's installed globally. and thereafter, all users would be using a global installed pip, no matter what they're first command was. Marcus ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] PEP439 and upgrading pip
On 15 June 2013 16:02, Marcus Smith qwc...@gmail.com wrote: 1. We should write the bootstrapped pip to the same location that we're installing the package to (so system global, user local or current venv). this makes sense for global and user installs, but not venv? when you're in a venv, you're using the pip installed in that specific venv, not the bootstrap. True for virtualenv, but not for pyvenv - that doesn't install anything into the virtual environment, it just creates it. I expect the 3.4 version will add a link to the appropriate bootstrapping script though, so we need to define the expected behaviour in that case. and just to confirm about user install bootstrapping, it would work like this? - user1 happens to run pip3 install --user django as his first pip3 command - the bootstrap installs pip to /home/user1/.local - thereafter, user1's executions of pip3 detects the importable pip in user local, and does no more bootstrapping - user2 runs pip3 install --user django as his first pip3 command - the bootstrap installs pip to /home/user2/.local ... and if instead user1 ran sudo pip install django as his first command, pip get's installed globally. and thereafter, all users would be using a global installed pip, no matter what they're first command was. That is what I was saying, but with it spelled out like that, I don't like it. The destination of the current install request isn't adequate justification for defining the location of the installed pip. Instead, I'm starting to think that with the right error message, Explicit is better than implicit and In the face of ambiguity, refuse the temptation to guess should rule the day here. For example: $pip3 install Django pip is not currently installed. Run 'pip3 bootstrap' or 'pip3 bootstrap --system' to install it. $pip3 bootstrap --help Usage: pip3 bootstrap pip3 bootstrap --system Description: Downloads and installs the latest version of pip from the Python Package Index (pypi.python.org). Installs into the active virtual environment (if any) or the current user's site-packages directory. Has no effect if pip is already installed (run pip install --upgrade pip to upgrade to a later version). Options: --system Install into the system site-packages instead of the venv or user site-packages. --wheel file Installs from the given wheel file instead of downloading from PyPI Linux distros could then patch the 'pip3 bootstrap --system' variant to invoke the appropriate platform specific installation command. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] bdist_msi install-script observations
Hello, two things I've noticed when testing an install script with bdist_msi: - The installer requests admin privileges for an installation for all users (on Windows 7), but the install script does not seem to be executed with admin privileges. E.g., execution of win32.com.server.register.RegisterClasses fails with pywintypes.error: (5, 'RegSetValue', 'Access denied') - If an error occurrs in the install script, the installer claims Your system has not been changed when in fact all files have been installed. My fault, bug, or feature? Thanks, Malte ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] error using easy_install
My setup.py: -- 8 -- from distutils.core import setup long_desc = open('enum.rst').read() setup( name='stoneleaf.enum', version='1.0.1', url='https://pypi.python.org/pypi/stoneleaf.enum', packages=['enum'], package_dir={'enum':''}, package_data={'enum':['enum.rst', 'enum.pdf', 'test/test_enum.py', 'test/py2_test_enum.py', 'test/py3_test_enum.py']}, license='BSD License', description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4', long_description=long_desc, provides=['enum'], author='Ethan Furman', author_email='et...@stoneleaf.us', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Topic :: Software Development' ], ) -- 8 -- Error trying to install it with easy_install after uploading it to PyPI: ethan@hydra:~$ sudo easy_install stoneleaf.enum Searching for stoneleaf.enum Reading http://pypi.python.org/simple/stoneleaf.enum/ Best match: stoneleaf.enum 1.0.1 Downloading http://pypi.python.org/packages/source/s/stoneleaf.enum/stoneleaf.enum-1.0.1.zip#md5=c41abd7ad04f11e8b545cfca7758a4f2 Processing stoneleaf.enum-1.0.1.zip Writing /tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/setup.cfg Running stoneleaf.enum-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/egg-dist-tmp-IpvhLD error: Setup script exited with error: can't copy 'num.rst': doesn't exist or not a regular file There is no 'num.rst' file in the package -- it should be 'enum.rst'. Any ideas? Is this the right place to post? -- ~Ethan~ ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] Post-merge setuptools Python 3 single-codebase port available
Following the setuptools/distribute merge, I've updated my single codebase port of the merged setuptools at [1]. Source of my repo is available at [2] (single-codebase branch). Travis integration has been set up; results are at [3]. Currently, all tests are passing for 2.5, 2.6, 2.7, 3.2, and 3.3. For installation into PEP 405 venvs, a wheel has been set up at [4]. Feedback welcome. Regards, Vinay Sajip [1] https://bitbucket.org/pypa/setuptools/ [2] https://bitbucket.org/vinay.sajip/setuptools/ [3] https://travis-ci.org/vsajip/setuptools/ [4] https://bitbucket.org/vinay.sajip/setuptools/downloads/ ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] error using easy_install
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/2013 02:29 AM, Ethan Furman wrote: My setup.py: -- 8 -- from distutils.core import setup long_desc = open('enum.rst').read() setup( name='stoneleaf.enum', version='1.0.1', url='https://pypi.python.org/pypi/stoneleaf.enum', packages=['enum'], package_dir={'enum':''}, package_data={'enum':['enum.rst', 'enum.pdf', 'test/test_enum.py', 'test/py2_test_enum.py', 'test/py3_test_enum.py']}, license='BSD License', description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4', long_description=long_desc, provides=['enum'], author='Ethan Furman', author_email='et...@stoneleaf.us', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Topic :: Software Development' ], ) -- 8 -- Error trying to install it with easy_install after uploading it to PyPI: ethan@hydra:~$ sudo easy_install stoneleaf.enum Searching for stoneleaf.enum Reading http://pypi.python.org/simple/stoneleaf.enum/ Best match: stoneleaf.enum 1.0.1 Downloading http://pypi.python.org/packages/source/s/stoneleaf.enum/stoneleaf.enum-1.0.1.zip#md5=c41abd7ad04f11e8b545cfca7758a4f2 Processing stoneleaf.enum-1.0.1.zip Writing /tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/setup.cfg Running stoneleaf.enum-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LY_zzX/stoneleaf.enum-1.0.1/egg-dist-tmp-IpvhLD error: Setup script exited with error: can't copy 'num.rst': doesn't exist or not a regular file There is no 'num.rst' file in the package -- it should be 'enum.rst'. Any ideas? Is this the right place to post? This is the right place. Your 'package_data' declaration is getting munged:: /tmp/stone/stoneleaf.enum-1.0.1/build/bdist.linux-i686/egg/setuptools /command/build_py.py(80)build_package_data() - self.copy_file(os.path.join(src_dir, filename), target) (Pdb) l 75lastdir = None 76for package, src_dir, build_dir, filenames in self.data_files: 77for filename in filenames: 78target = os.path.join(build_dir, filename) 79self.mkpath(os.path.dirname(target)) 80 -self.copy_file(os.path.join(src_dir, filename), target) 81 82 83def analyze_manifest(self): 84self.manifest_files = mf = {} 85if not self.distribution.include_package_data: (Pdb) pp self.data_files [('enum', '', 'build/lib/enum', ['num.rst', 'num.pdf', 'est/test_enum.py', 'est/py2_test_enum.py', 'est/py3_test_enum.py'])] Looking at the 'build_py' step, this line is problematic: package_dir={'enum':''}, When I change it to: package_dir={'enum':'.'}, then the install succeeds. I would probably just make an 'enum' subdir, move the files into it, and be done with it ('setup.py' isn't logically part of the package: it is in the wrapper). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlG8oNUACgkQ+gerLs4ltQ4axQCgh1YAyvqC/ZRJs1V6U4jQ66as 9VQAnRmJqhFINjzjCx2eftJfALKj/vsc =o/a+ -END PGP SIGNATURE- ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Post-merge setuptools Python 3 single-codebase port available
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/2013 12:35 PM, Vinay Sajip wrote: Following the setuptools/distribute merge, I've updated my single codebase port of the merged setuptools at [1]. Source of my repo is available at [2] (single-codebase branch). Travis integration has been set up; results are at [3]. Currently, all tests are passing for 2.5, 2.6, 2.7, 3.2, and 3.3. For installation into PEP 405 venvs, a wheel has been set up at [4]. Feedback welcome. Thank you for your work! +100 for an immediate merge. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlG8oTgACgkQ+gerLs4ltQ5/FwCgiYZt/q+t6t2emibspuUAYDLG r4UAn07mxKKQWvpNhG1aLgLZsZ2i2WIO =/7Yf -END PGP SIGNATURE- ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig