Bug 203961

Summary: sysutils/watchman: pywatchman fails due to version out of date
Product: Ports & Packages Reporter: Tony Narlock <tony>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: linpct
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (linpct)
Hardware: Any   
OS: Any   
Bug Depends on: 201031    
Bug Blocks:    

Description Tony Narlock 2015-10-22 15:22:29 UTC
pywatchman is an officially supported python wrapper that relies on your system's watchman.

https://github.com/facebook/watchman/tree/master/python

I built 4.1.0 from source and watchman + pywatchman works correctly.

Another bug #201031 is a patch to upgrade 3.0.0 to 3.5.0 - however now a few months have passed, and that is out of date now too.

Conversation with upstream maintainer @ https://github.com/facebook/watchman/issues/176

$ freebsd-version -ku; uname -apKU 
11.0-CURRENT
11.0-CURRENT
FreeBSD x230 11.0-CURRENT FreeBSD 11.0-CURRENT #0: Wed Oct  7 17:47:58 CDT 2015     root@x230:/usr/obj/usr/src/sys/MYKERNEL  amd64 amd64 1100080 1100080

$ pkg info watchman
watchman-3.0.0
Name           : watchman
Version        : 3.0.0
Installed on   : Thu Oct 22 09:46:52 CDT 2015
Origin         : sysutils/watchman
Architecture   : freebsd:11:x86:64
Prefix         : /usr/local
Categories     : sysutils
Licenses       : APACHE20
Maintainer     : linpct@gmail.com
WWW            : https://facebook.github.io/watchman/
Comment        : File alteration monitoring service
Shared Libs required:
        libpcre.so.1
Annotations    :
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 163KiB
Description    :
Watchman exists to watch files and record when they change.  It can also
trigger actions (such as rebuilding assets) when matching files change.

WWW: https://facebook.github.io/watchman/


$ watchman-make -p '**/*.py' --make './run-tests.py' -t test
Traceback (most recent call last):
  File "/usr/home/tony/study/python/tmuxp/.env/bin/watchman-make", line 171, in <module>
    required=['cmd-watch-project', 'wildmatch'])
  File "/usr/home/tony/study/python/tmuxp/.env/lib/python2.7/site-packages/pywatchman/__init__.py", line 509, in capabilityCheck
    capabilities.synthesize(res, opts)
NameError: global name 'opts' is not defined
Comment 1 linpct 2015-10-23 03:12:19 UTC
Hi, I'll try to send another patch if build new version done.

Thanks.
Comment 2 linpct 2015-10-23 03:34:29 UTC
Hi, I'd send another patch now.

Needs committers' help.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-12-09 03:25:58 UTC
Try sysutils/py-pywatchman port. It's supposed to pin version that will work with sysutils/watchman.