Bug 219804 - textproc/py-enchant: Make wxPython OPTIONAL
Summary: textproc/py-enchant: Make wxPython OPTIONAL
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-05 18:14 UTC by pete
Modified: 2017-06-10 15:07 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (thierry)


Attachments
Make Wx support optional (599 bytes, patch)
2017-06-07 20:21 UTC, Thierry Thomas
thierry: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pete 2017-06-05 18:14:57 UTC
Hi there, 
I use textprox/py-enchant for a web application.  Specifically we use py-enchant to act as a spell checker inside ckeditor for some webforms in our app.  The current py-enchant port has a USE_* dependency on wxPython.  This pulls in a pretty large dependency tree (totaling around 1GB of packages - most of which are related to X and graphics libraries) which we do not need or really want on our web app nodes.

In my environment I have verified that I can build the port without the following lines and things works as expected:

$ diff -u Makefile Makefile.wip 
--- Makefile	2017-06-05 18:11:25.603805000 +0000
+++ Makefile.wip	2017-06-05 18:12:04.288514000 +0000
@@ -18,8 +18,6 @@
 
 USES=		python
 USE_PYTHON=	distutils
-USE_WX=		3.0+
-WX_COMPS=	python:run
 
 LDFLAGS+=	-L${LOCALBASE}/lib


Would it be a better long-term solution to define USE_WX as an optional flag that users can override?
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2017-06-07 20:21:05 UTC
Created attachment 183310 [details]
Make Wx support optional

The attached patch does what you want.

Unfortunately, this is not very clean:

- the dependency on x11-toolkits/py-wxPython30 is removed, but there is no way to configure it, and it will be used if found on the machine;

- anyway, wxSpellCheckerDialog.py will be installed, even if not usable (well, it could be possible to remove it).
Comment 2 pete 2017-06-07 20:49:15 UTC
(In reply to Thierry Thomas from comment #1)
Thanks Theirry!

I'll give this patch a spin on my poudriere infra later today.

FWIW - regarding wxSpellCheckerDialog.py being included regardless of it being usable.  This is actually what happens when the module is installed via PIP - so this might not be a regression?
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2017-06-08 21:08:35 UTC
OK, committed.

Thanks for the suggestion.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-06-08 21:09:17 UTC
A commit references this bug:

Author: thierry
Date: Thu Jun  8 21:08:33 UTC 2017
New revision: 442959
URL: https://svnweb.freebsd.org/changeset/ports/442959

Log:
  Make wxPython optional.

  Note: no PORTREVISION bump, because the default is not changed.

  PR:		219804
  Submitted by:	pete (at) nomadlogic.org

Changes:
  head/textproc/py-enchant/Makefile
  head/textproc/py-enchant/pkg-plist
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-06-10 15:07:42 UTC
A commit references this bug:

Author: thierry
Date: Sat Jun 10 15:06:41 UTC 2017
New revision: 443098
URL: https://svnweb.freebsd.org/changeset/ports/443098

Log:
  Use option helpers.

  PR:		219804
  Reported by:	koobs

Changes:
  head/textproc/py-enchant/Makefile