-
Notifications
You must be signed in to change notification settings - Fork 97
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
Could pip install
mirror the recommended installation command?
#217
Comments
Unfortunately that isn't possible. pip just runs setup.py without allowing the user to specify any additional options. setup.py couldn't practically tell the difference between pip invoking it and a user or other script invoking it. APSW is not available on PyPI/pip because of their limitations. I've not seen any progress on that front. (The underlying reason is their sweet spot is distributing python code, and they are poorer at distributing C code and binaries.) A random person has put an older version of APSW on PyPI but it won't work for the vast majority of people. |
It s irrelevant whether |
It isn't practical for setup.py to use the recommended options by default, otherwise I would have long ago! setup.py is mostly a data structure written in python, and it is distutils (or setuptools if present) that decides what to do. In particular note that there a number of Commands, and distutils/setuptools devices which ones to run in which order, combining their own internal logic as well as command line options, other files (eg setup.cfg), and whatever their caller stated if there is one (eg pip). |
I have gotten apsw to install via pip using the following incantation:
--global-option, apparently, just passes the arguments along to the underlying script. Currently I have a script that uses the GitHub API to programmatically determine the url of the latest release. It's hella ugly, but it works. |
@karlnack that is very helpful. Do you know how long pip has had that option? I'll have to do a bit more investigation as it looks like global options can only be inserted before the build command. (For example it would be a good idea if test could be run which has to come after the build command.) |
No, I don't. In full disclosure, I actually swiped that command from another project here on GitHub, and it seemed to work. Offhand, I don't remember which though. |
@rogerbinns I see that @karlnack |
@zed the bit you are missing is that distutils/setuptools is what calls the various commands. I have no control over which ones are executed or in which order. Setting I am going to try and make a pip install with the global options command line, and if it works add that to the doc. It will require compilation. Windows users do already have prepackaged builds, although they can't be installed with pip (not that I have tried ...). |
If What stops your custom The prepackaged binaries do not correspond to the recommended command (they do not contain all extensions). As far as I understand, if you upload binary wheels such as these but that support all extensions to PyPI when
|
Which ones are missing? As for the rest of the comment, things are more complicated, and also have changed over time. For example the fetch of SQLite gets the zip file if the target is Windows, otherwise the tar.gz. (They do have different contents.) Extensions are sometimes included with the amalgamation, and sometimes in separately downloaded files. setup.py knows about that. The --enable-all-extensions setting also knows what fetch got, so it can enable the extensions that exist. Same thing with the test code. You should also understand just how time consuming making a release is. The non-Windows side only takes a minute or two. Windows takes several hours, and is a lot more painful. I'm not too keen on making even more work for myself :-) |
The ICU extension. I understand that my suggestions do not contain all the details that might be needed to implement the feature. I would need to submit a pull request, to provide all the details (what is the source code after all: it is a way for one programmer to communicate to another programmer what the computer should do with enough detail). I believe it is possible to change the defaults to correspond to the recommended options without complicating the release process more than it is now. I may be wrong. |
I don't want to discourage you, and there is definitely no need for pull requests etc. The general problem is that all this stuff is complicated, there are many tradeoffs, some things are done for historical reasons (but should be re-examined) etc. Changing things also requires updated test code and documentation. They often are far more effort than the change. I'be made #218 for the Windows/ICU issue. You are welcome to convince me otherwise there :-) |
The docs recommend on Mac/Linux:
Is it possible that
pip install apsw
would install the equivalent version and (optionally) provide a binary install where possible (OSX, Windows)? (I know,pip install
does something different now).If somebody doesn't like the recommended options; they may use the explicit
python setup.py
command with their preferred options.The text was updated successfully, but these errors were encountered: