Skip to content
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

reorganize and update conda/python install docs #79

Merged
merged 10 commits into from
Sep 16, 2020

Conversation

amueller
Copy link
Contributor

@amueller amueller commented Sep 16, 2020

cc @bpkroth @markusweimer

Not sure if I'm undoing some of the work @markusweimer has been doing here before.
I grouped the OS independent steps in the beginning.

I think the "manual python" version is not that useful because it's ubuntu only (not sure if the ppas work for debian?), and there's really no reason to compile your own version of pyodbc, so I removed it.

README.md Outdated Show resolved Hide resolved
@bpkroth bpkroth requested review from a team and markusweimer September 16, 2020 02:47
Copy link
Contributor

@bpkroth bpkroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Just two minor issues to fix that I saw.

Are we abandoning any support for straight pip requirements support, or just relegating it to the advanced users that want to peer under the hood (e.g. inside the Dockerfile or some such).
Should we make an issue to track fixing up our build pipelines to do the same?

@bpkroth
Copy link
Contributor

bpkroth commented Sep 16, 2020

cc @bpkroth @markusweimer

Not sure if I'm undoing some of the work @markusweimer has been doing here before.
I grouped the OS independent steps in the beginning.

I think the "manual python" version is not that useful because it's ubuntu only (not sure if the ppas work for debian?), and there's really no reason to compile your own version of pyodbc, so I removed it.

re: Debian, no (and it pains me to say so), I don't think they work on pure Debian, but that has more to do with our current need to pin to certain older versions than the pip stuff.

amueller and others added 2 commits September 16, 2020 11:01
Co-authored-by: Brian Kroth <bpkroth@users.noreply.github.com>
Co-authored-by: Brian Kroth <bpkroth@users.noreply.github.com>
@amueller
Copy link
Contributor Author

amueller commented Sep 16, 2020

I think delegating the pip installation to more experienced users is fine. Most python folks will use conda. And if they want to use pip, the requirements for installation are actually all in setup.py, and giving full instructions on how to build the requirements is quite hard (CI just failed the build because it couldn't compile parts of matplotlib, which requires a lot of stuff to work properly).

The way it's set up, someone that knows a bit about how python packaging works shouldn't really need any instructions as the standard "pip install the folder with the setup.py" just does the trick if your environment is "reasonable".

Scikit-learn had installation instructions on how to install the build-requirements for blas across different OSs for a long time in the main installation page, and it caused people a lot of pain when they could have just "conda install"ed or even "pip install"ed.

The main reason the pip install isn't that smooth for us right now is the pinning, I think, and potentially the absence of binary wheels of pyodbc for some OSs.

@amueller
Copy link
Contributor Author

amueller commented Sep 16, 2020

ohh it's failing because you're parsing the environment.yml and installing it with pip which obviously fails for conda packages... so I'm not entirely sure what to do about that. Maybe I'll hard-code a fix in the conda-to-pip converter?

Might be better to have a separate requirements for building the docs and using that if we want to use pip there?

@amueller
Copy link
Contributor Author

closes #31.

@amueller
Copy link
Contributor Author

Do we have an issue to move the CI to conda?

@@ -29,7 +29,9 @@
pattern=r'([^=])=([^=])',
repl='\\1==\\2',
string=item)
new_dependencies.append(new_item)
if "conda" not in new_item and not new_item.startswith("python"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was that not handled with the excluded_dependencies below? Oh, I see, it's now no longer an exact match. Maybe move it down there just to consolidate?

Honestly this whole script hack can probably just go away if we decide that we're consolidating on some form of conda, but let's leave that for a future PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want me to consolidate or leave it for moving to conda?

Copy link
Contributor

@bpkroth bpkroth Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion for now is to just switch to something like this below for now:

-    if item in excluded_dependencies:
+    dep_name = re.split('[><=]+', item)[0]
+    if dep_name in excluded_dependencies:

(tested locally, seems to work as expected)

@bpkroth bpkroth mentioned this pull request Sep 16, 2020
@bpkroth
Copy link
Contributor

bpkroth commented Sep 16, 2020

Do we have an issue to move the CI to conda?

We do now :) #83

@amueller amueller merged commit cf78c49 into microsoft:main Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants