-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The --build-dir options doesn't work for local archive installs #804
Comments
the parsing currently doesn't try to determine a "project name" just from a archive file alone, so therefore doesn't create a build dir using the name it didn't parse, but rather uses a tmp dir. in most cases it should/could parse something I think. btw, the new project for now though, a workaround is to install from the local archive using
|
@vsajip, what's the origins of this function and supported scope?
IIRC I wrote it for distlib. I would have thought there'd be similar functions in setuptools/distribute/pip. I use it in my pypi/simple scraping code - isn't there an equivalent in pip.index?
|
there's an equivalent that assumes you have a project name to use in parsing, but nothing that just parses in the abstract. btw, I'm using your function in a project at work. could pip just grab this w/o trying to use distlib for now? |
Sure, as long as you pass back any improvements you make ;-) Just kidding, but it would be nice if you did. |
my concern is to be clear what version schemes it's supposed to work for or not work for.... corner cases that fail, or work, but shouldn't etc.... I certainly pass back clarity/fixes related to that. |
It's meant to be version-scheme agnostic. The version part will match any sequence of alphanumerics, underscores, period, plus and minus, which should cover most sane version numbers. I have been thinking about changing the regex so that project name components can't have '-' - at the moment it allows 'my.project.name' or 'my-project-name', but that won't work in the case where version is e.g. 'latest-0.9' and the composite is 'my-project-name-latest-0.9', unless a project name is passed in. Although setuptools/distribute convert '-' in project names to '_' in file names of corresponding distributions, I don't think distutils does, so there are ambiguous filenames out there AFAIK. |
leaving open; we should update the --build help text to explain this. |
adding an important comment from #2060 (#2060 (comment) ) "even if it uses the temp build directory, there's no rationale for --no-clean to be ignored" |
The cause of this issue as well as related ones like gh-3171 seems to be that the |
Closing this, with #4371 we're going to be deprecating/removing the |
Please reopen, this issue still remains. |
I'm not sure what "local archive installs" in the title means here, but at least
|
When installing from a local archive, the --build-dir option is ignored and instead a temporary directory is always used.
As far as I can tell this is decided in req.py, in InstallRequirement.build_location(), where the value supplied by --build-dir is only taken into consideration if self.req is not None. I'm not really sure what self.req is meant to represent so I can't submit a patch at this time (or decide if this is expected behaviour in some way).
Thanks for your feedback.
UPDATE: #1831 fixed this for wheel archives. the problem remains for local sdist installs.
The text was updated successfully, but these errors were encountered: