Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Side by Side Diff: Lib/distutils/command/install.py

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/distutils/command/build_ext.py ('k') | Lib/distutils/cygwinccompiler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """distutils.command.install 1 """distutils.command.install
2 2
3 Implements the Distutils 'install' command.""" 3 Implements the Distutils 'install' command."""
4 4
5 import sys 5 import sys
6 import os 6 import os
7 7
8 from distutils import log 8 from distutils import log
9 from distutils.core import Command 9 from distutils.core import Command
10 from distutils.debug import DEBUG 10 from distutils.debug import DEBUG
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 # Well, we're not actually fully completely finalized yet: we still 377 # Well, we're not actually fully completely finalized yet: we still
378 # have to deal with 'extra_path', which is the hack for allowing 378 # have to deal with 'extra_path', which is the hack for allowing
379 # non-packagized module distributions (hello, Numerical Python!) to 379 # non-packagized module distributions (hello, Numerical Python!) to
380 # get their own directories. 380 # get their own directories.
381 self.handle_extra_path() 381 self.handle_extra_path()
382 self.install_libbase = self.install_lib # needed for .pth file 382 self.install_libbase = self.install_lib # needed for .pth file
383 self.install_lib = os.path.join(self.install_lib, self.extra_dirs) 383 self.install_lib = os.path.join(self.install_lib, self.extra_dirs)
384 384
385 # If a new root directory was supplied, make all the installation 385 # If a new root directory was supplied, make all the installation
386 # dirs relative to it. 386 # dirs relative to it.
387 if self.root is not None: 387
388 # root and prefix aren't clearly defined or used in the midst of this in stall
389 # on posix systems prefix is used to define a base path. If root is used
390 # in addition, it will prefix the prefix path. Not sure if that's intent ional
391 # or not but it certainly doesn't work on mingw.
392 # Ex: prefix=/mingw/, root=/mingw/lib
393 # this will distribute all the scrits and libs in /mingw/lib/mingw
394 #
395 print('root=%s, prefix-%s' % (self.root, prefix))
396 if self.root is not None and prefix is None:
388 self.change_roots('libbase', 'lib', 'purelib', 'platlib', 397 self.change_roots('libbase', 'lib', 'purelib', 'platlib',
389 'scripts', 'data', 'headers') 398 'scripts', 'data', 'headers')
390 399
391 self.dump_dirs("after prepending root") 400 self.dump_dirs("after prepending root")
392 401
393 # Find out the build directories, ie. where to install from. 402 # Find out the build directories, ie. where to install from.
394 self.set_undefined_options('build', 403 self.set_undefined_options('build',
395 ('build_base', 'build_base'), 404 ('build_base', 'build_base'),
396 ('build_lib', 'build_lib')) 405 ('build_lib', 'build_lib'))
397 406
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 return self.distribution.has_data_files() 680 return self.distribution.has_data_files()
672 681
673 # 'sub_commands': a list of commands this command might have to run to 682 # 'sub_commands': a list of commands this command might have to run to
674 # get its work done. See cmd.py for more info. 683 # get its work done. See cmd.py for more info.
675 sub_commands = [('install_lib', has_lib), 684 sub_commands = [('install_lib', has_lib),
676 ('install_headers', has_headers), 685 ('install_headers', has_headers),
677 ('install_scripts', has_scripts), 686 ('install_scripts', has_scripts),
678 ('install_data', has_data), 687 ('install_data', has_data),
679 ('install_egg_info', lambda self:True), 688 ('install_egg_info', lambda self:True),
680 ] 689 ]
OLDNEW
« no previous file with comments | « Lib/distutils/command/build_ext.py ('k') | Lib/distutils/cygwinccompiler.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+