Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

New formula: vdirsyncer 0.6.0 #41208

Closed
wants to merge 1 commit into from

Conversation

benjaminfrank
Copy link
Contributor

Synchronize calendars and contacts https://vdirsyncer.readthedocs.org/

sha256 "0992d4c0c98e71a0638050f3900125a82bd29e15d5be080a4520830fa48c660a"

option "without-keyring", "Build without python-keyring support"
depends_on :python3
Copy link
Member

Choose a reason for hiding this comment

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

Blank line between the option and dependency, please.

@DomT4
Copy link
Member

DomT4 commented Jul 2, 2015

@BrewTestBot test this please

@tdsmith
Copy link
Contributor

tdsmith commented Jul 2, 2015

If this is only interesting to you as a dependency of that other package, then this PR can be closed.

Does this really need python3? We use system Python (meaning python 2) when possible. All instances of "python3.4" need to use the result of Language::Python.major_minor_version "python3" instead, like:

xy = Language::Python.major_minor_version "python3"
... libexec/"lib/python#{xy}/site-packages" ...

@benjaminfrank
Copy link
Contributor Author

As already mentioned, it is first and foremost a standalone application to sync {card,cal}dav endpoints with your local filesystem. aside from that, it offers some library like API for applications to call.
As for python3: python2 does not work as there is a dependency (forgot which one) requires python3. I will include the mentioned changes,

@benjaminfrank
Copy link
Contributor Author

Should I use Language::Python.major_minor_version "python3" for python2 as well? as in Language::Python.major_minor_version "python2" ?

@untitaker
Copy link

python2 does not work as there is a dependency (forgot which one) requires python3

That's not true, vdirsyncer works against Python 2.7 and Python 3.3+ (Python 3.2 and 3.1 are not supported)

@benjaminfrank
Copy link
Contributor Author

Yes, that comment from me is rather outdated. I thought that click requires python3 (the error said something about pyhton3 and lazy me just tried pathon3 and everything was fine, so I assumed python3) but a closer look indicated another issue regarding proper LANG env settings.

Long story short, the formula does not require python2 and works with the os x system python.

@untitaker
Copy link

Ok, I forgot to mention that the user experience is better with vdirsyncer running on Python 3 though. Whether that's worth the extra dependency is up to you.

On 11 July 2015 14:00:26 CEST, benjaminfrank notifications@github.com wrote:

Yes, that comment from me is rather outdated. I thought that click
requires python3 (the error said something about pyhton3 and lazy me
just tried pathon3 and everything was fine, so I assumed python3) but a
closer look indicated another issue regarding proper LANG env settings.

Long story short, the formula does not require python2 and works with
the os x system python.


Reply to this email directly or view it on GitHub:
#41208 (comment)

Sent from my phone. Please excuse my brevity.

@MikeMcQuaid
Copy link
Member

Ok, I forgot to mention that the user experience is better with vdirsyncer running on Python 3 though.

@untitaker Mind elaborating a bit so we can decide? Thanks!

@untitaker
Copy link

Under Python 2, vdirsyncer doesn't respond to ^C properly, or only after a long
time. I personally don't think it's worth to introduce such a huge dependency.

pimutils/vdirsyncer#219

On Sat, Jul 11, 2015 at 01:29:00PM -0700, Mike McQuaid wrote:

Ok, I forgot to mention that the user experience is better with vdirsyncer running on Python 3 though.

@untitaker Mind elaborating a bit so we can decide? Thanks!


Reply to this email directly or view it on GitHub:
#41208 (comment)

@MikeMcQuaid
Copy link
Member

@untitaker Cool, thanks, Python 2 it is.
@benjaminfrank Still waiting for a better test here. No rush but just wanted you to know, thanks!

@benjaminfrank
Copy link
Contributor Author

I will try to come up with something meaningfull, but in the progress I found another issue with tls/ssl I need to figure out first.

@cweagans
Copy link
Contributor

Looking forward to this. I don't think it's reasonable to hold this up on a more meaningful test. The offlineimap formula just runs offlineimap --version because testing the actual application functionality is out of scope for the homebrew formula. I think the same should apply here. Can we move forward?

@cweagans
Copy link
Contributor

That said, this formula doesn't successfully install for me. I'm on Yosemite.

Ran https://raw.githubusercontent.com/benjaminfrank/homebrew/vdirsyncer/Library/Formula/vdirsyncer.rb and got this:

$ brew install https://raw.githubusercontent.com/benjaminfrank/homebrew/vdirsyncer/Library/Formula/vdirsyncer.rb
######################################################################## 100.0%
==> Downloading https://github.com/untitaker/vdirsyncer/archive/0.5.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/vdirsyncer-0.5.2.tar.gz
==> Downloading https://pypi.python.org/packages/source/c/click/click-4.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/vdirsyncer--click-4.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/vdirsyncer/0.5.2/libexec/vendor --single-version-externally-managed --record=installed.txt
==> Downloading https://pypi.python.org/packages/source/r/requests/requests-2.7.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/vdirsyncer--requests-2.7.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/vdirsyncer/0.5.2/libexec/vendor --single-version-externally-managed --record=installed.txt
==> Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.4.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/vdirsyncer--lxml-3.4.4.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/vdirsyncer/0.5.2/libexec/vendor --single-version-externally-managed --record=installed.txt
==> Downloading https://pypi.python.org/packages/source/r/requests-toolbelt/requests-toolbelt-0.4.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/vdirsyncer--requests-toolbelt-0.4.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/vdirsyncer/0.5.2/libexec/vendor --single-version-externally-managed --record=installed.txt
==> Downloading https://pypi.python.org/packages/source/a/atomicwrites/atomicwrites-0.1.5.tar.gz
Already downloaded: /Library/Caches/Homebrew/vdirsyncer--atomicwrites-0.1.5.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/vdirsyncer/0.5.2/libexec/vendor --single-version-externally-managed --record=installed.txt
==> Downloading https://pypi.python.org/packages/source/k/keyring/keyring-5.3.zip
Already downloaded: /Library/Caches/Homebrew/vdirsyncer--keyring-5.3.zip
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/vdirsyncer/0.5.2/libexec/vendor --single-version-externally-managed --record=installed.txt
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/vdirsyncer/0.5.2/libexec --single-version-externally-managed --record=installed.txt
    ep.load()(self, ep.name, value)
  File "build/bdist.macosx-10.10-intel/egg/setuptools_scm/integration.py", line 17, in version_keyword
  File "build/bdist.macosx-10.10-intel/egg/setuptools_scm/__init__.py", line 56, in get_version
  File "build/bdist.macosx-10.10-intel/egg/setuptools_scm/__init__.py", line 27, in version_from_scm
LookupError: no scm found for '/private/tmp/vdirsyncer20150724-14329-1yei5so/vdirsyncer-0.5.2'

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
New formula: vdirsyncer 0.5.2 (https://github.com/Homebrew/homebrew/pull/41208)

@benjaminfrank
Copy link
Contributor Author

Yes, this error is known. The issue is that the github releases do not contain neither the version.py file nor the .git infos that would be require for setuptools_scm to generate ist.
The solution is to simply use the pypi releases. However, I was too busy to change that so far as there is another thing that I wasn't able to solve yet. vdirsyncher build fine for me but can't connect to https sites. I am not sure what the real issue is here. When I use pip, vdirsyncer installs fine and can connect to https. I did all the same steps use all the same package versions, but something seems differen. But I am real tight on time this week, so sorry for this.
I'll quikly change the release so vdirsyncer builds at least.

@untitaker
Copy link

Your latest commit is called 0.2.5 when it should be 0.5.2 FWIW.

On 25 July 2015 08:29:22 CEST, benjaminfrank notifications@github.com wrote:

Yes, this error is known. The issue is that the github releases do not
contain neither the version.py file nor the .git infos that would be
require for setuptools_scm to generate ist.
The solution is to simply use the pypi releases. However, I was too
busy to change that so far as there is another thing that I wasn't able
to solve yet. vdirsyncher build fine for me but can't connect to https
sites. I am not sure what the real issue is here. When I use pip,
vdirsyncer installs fine and can connect to https. I did all the same
steps use all the same package versions, but something seems differen.
But I am real tight on time this week, so sorry for this.
I'll quikly change the release so vdirsyncer builds at least.


Reply to this email directly or view it on GitHub:
#41208 (comment)

Sent from my phone. Please excuse my brevity.

@benjaminfrank
Copy link
Contributor Author

Your latest commit is called 0.2.5 when it should be 0.5.2 FWIW.

I am sorry, but I don't get it. I can't find anything containing 0.2.5....could you be more specific so I can fix it? Thanks.

@untitaker
Copy link

Eugh, seems like I misread myself, sorry for the noise.

On 25 July 2015 09:50:16 CEST, benjaminfrank notifications@github.com wrote:

Your latest commit is called 0.2.5 when it should be 0.5.2 FWIW.

I am sorry, but I don't get it. I can't find anything containing
0.2.5....could you be more specific so I can fix it? Thanks.


Reply to this email directly or view it on GitHub:
#41208 (comment)

Sent from my phone. Please excuse my brevity.

@benjaminfrank
Copy link
Contributor Author

No problem.

@untitaker
Copy link

0.6.0 is out.

@benjaminfrank
Copy link
Contributor Author

Sorry for taking my time, but I wasn't around the last month.
Updated to 0.6.0 and added a proper test.


option "without-keyring", "Build without python-keyring support"

depends_on :python
Copy link
Member

Choose a reason for hiding this comment

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

This should be depends_on :python if MacOS.version <= :snow_leopard AFAIK. Otherwise we end up making everyone who installs this from a bottle install our Python first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is intentional as the system python has (some) broken ssl code such that you can't use https connections with vdirsyncer. at least it didn't work for me.

Edit: here is the error when using the system python:

/usr/local/Cellar/vdirsyncer/0.6.0/libexec/vendor/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: 
InsecurePlatformWarning: A true SSLContext object is not available. 
This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. 
For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

Choose a reason for hiding this comment

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

In that case you might as well depend on Python 3 since vdirsyncer works better with it, no?

On 5 September 2015 08:53:47 CEST, benjaminfrank notifications@github.com wrote:

@@ -0,0 +1,91 @@
+class Vdirsyncer < Formula

  • option "without-keyring", "Build without python-keyring support"
  • depends_on :python

That is intentional as the system python has (some) broken ssl code
such that you can't use https connections with vdirsyncer. at least it
didn't work for me


Reply to this email directly or view it on GitHub:
https://github.com/Homebrew/homebrew/pull/41208/files#r38808419

Sent from my phone. Please excuse my brevity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that should be possible, not sure about other pros/cons. If no one objects I'll change that later.

Copy link
Member

Choose a reason for hiding this comment

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

That should have been fixed for 10.10.5. Other platforms may still have issues I guess. I seem to recall @tdsmith saying the warning wasn't entirely correct/accurate but not sure whether I'm recalling correctly on that and alas people will get upset if they see it. I'm happy with Python3 unless Tim isn't.

Copy link
Member

Choose a reason for hiding this comment

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

Also happy with Python3 unless @tdsmith disagrees.

@benjaminfrank benjaminfrank changed the title New formula: vdirsyncer 0.5.2 New formula: vdirsyncer 0.6.0 Sep 5, 2015
@benjaminfrank benjaminfrank force-pushed the vdirsyncer branch 2 times, most recently from bb71031 to bcfc073 Compare September 6, 2015 20:53
@benjaminfrank
Copy link
Contributor Author

Also updated the formula to use python3.

@benjaminfrank
Copy link
Contributor Author

Anything left I can do to include this into homebrew?

end

def install
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python3.4/site-packages"
Copy link
Member

Choose a reason for hiding this comment

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

This needs changing now. Python3 is up to 3.5. Tim has recommended:

version = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{version}/site-packages"

elsewhere to handle that, so that should work here I expect. You'd want:

ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{version}/site-packages"

for the primary installation as well.

@benjaminfrank
Copy link
Contributor Author

Thanks, changed that bit and will keep it in mind for other python programs.

@DomT4
Copy link
Member

DomT4 commented Sep 21, 2015

I'm happy enough here. Merged in 04438fc. Thank you for sticking with this @benjaminfrank!

@DomT4 DomT4 closed this in 04438fc Sep 21, 2015
@benjaminfrank benjaminfrank deleted the vdirsyncer branch September 21, 2015 18:07
@untitaker
Copy link

Hooray!

@benjaminfrank I see that vdirsyncer's tests are not run, but were you able to run the testsuite successfully on OS X?

@benjaminfrank
Copy link
Contributor Author

I admit I never even tried to run them as vdirsyncer just worked. I will give the tests a shot tonight.

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants