[issue993766] bdist_dumb and --relative on Windows fails

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue993766] bdist_dumb and --relative on Windows fails

2019-02-24 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue993766] bdist_dumb and --relative on Windows fails

2015-08-21 Thread Chris Hogan

Chris Hogan added the comment:

I think ensure_relative is incorrect. The comment in the function states:

 Take the full path 'path', and make it a relative path. This is useful to 
make 'path' the second argument to os.path.join().

However, according to the docs for os.path.join, if a component contains a 
drive letter, all previous components are thrown away and the drive letter is 
reset.  This makes the result from ensure_relative a poor candidate as a 
second argument to os.path.join on Windows because it will always contain a 
drive letter which will always wipe out the first argument.

 os.path.join('bar', 'c:foo')
'c:foo'

This is what happens when I try to build a simple distro with the command 
python setup.py bdist_dumb --relative. In 
Lib/distutils/command/bdist_dumb.py:bdist_dumb.run:

archive_root = os.path.join(self.bdist_dir, 
ensure_relative(install.install_base))

the call is

 os.path.join('build\\bdist.win-amd64\\dumb', 'C:path\\to\\python')
'C:path\\to\\python'

It seems to me that the intention is to return

'build\\bdist.win-amd64\\dumb\\path\\to\\python27'

Later in distutils.archive_util.make_archive, it tries to os.chdir into 
'C:path\\to\\python', which it can't do because that's not an absolute path 
(it's missing a '\' after 'C:').
As far as I can tell, the only thing the --relative flag does is to append the 
python install path onto the build location and build the archive there. 
However, this build location is temporary and gets deleted at the end of the 
process, so I don't really see the point.

I think there are two options here: 
1) Get rid of ensure_relative and do it like this:

archive_root = os.path.join(self.bdist_dir, 
os.path.splitdrive(install.install_base)[1].lstrip(os.sep))

This is the only place ensure_relative is ever used anyway.

2) Keep ensure_relative and do it like this:

archive_root = os.path.join(self.bdist_dir, 
os.path.splitdrive(ensure_relative(install.install_base))[1])

--
nosy: +christopher.hogan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue993766
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue993766] bdist_dumb and --relative on Windows fails

2014-09-30 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this still a problem?  Normally I'd be perfectly happy to try something on 
Windows but the mere mention of distutils sends shivers down my spine :(

--
components: +Windows
nosy: +BreamoreBoy, dstufft, eric.araujo
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue993766
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue993766] bdist_dumb and --relative on Windows fails

2014-09-30 Thread Patrice LACOUTURE

Patrice LACOUTURE added the comment:

I don't have any Windows box around to check, but I can see that there has been 
no change since then in this portion of code in branches 2.4, 2.7 and 3.4.

Therefore, this issue is very likely still there.

--
nosy: +PatriceL

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue993766
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue993766] bdist_dumb and --relative on Windows fails

2010-08-19 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
stage:  - needs patch
type:  - behavior
versions: +Python 2.7, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue993766
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue993766] bdist_dumb and --relative on Windows fails

2009-02-10 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
assignee:  - tarek
nosy: +tarek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue993766
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue993766] bdist_dumb and --relative on Windows fails

2008-06-26 Thread zouguangxian

zouguangxian [EMAIL PROTECTED] added the comment:

I encounter the same problem of Mark Hammond. I check the code in
repository, the ensure_relative function in python25 is:

def ensure_relative (path):
Take the full path 'path', and make it a relative path so
it can be the second argument to os.path.join().

drive, path = os.path.splitdrive(path)
if sys.platform == 'mac':
return os.sep + path
else:
if path[0:1] == os.sep:
path = drive + path[1:]
return path

I also checked python24, and didn't find the code which described by 
Patrice LACOUTURE in msg60533 (view).

--
nosy: +weck

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue993766
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com