Skip to content
Browse files

python:

 * add new 3rd-party module - [http://wwwsearch.sourceforge.net/mechanize/ mechanize]
 * refs [http://www.ip-phone-forum.de/showthread.php?t=265671 this thread]


git-svn-id: file:///var/svn/freetz/trunk@11465 149334a1-2f27-0410-a3b9-fc62619ac1e6
  • Loading branch information...
1 parent fe02c9d commit adfef2737c52af9f31036d8db6add139104fd70b er13 committed Dec 25, 2013
View
1 CHANGELOG
@@ -35,6 +35,7 @@ Latest changes:
* libusb-compat 0.1.5
* php 5.5.7
* PJProject 2.1.0-git
+ * python-mechanize 0.2.5
* serf 1.2.1
* ScanButton 0.2.3.cvs20090713
* speex 1.2rc1
View
9 make/python-mechanize/Config.in
@@ -0,0 +1,9 @@
+config FREETZ_PACKAGE_PYTHON_MECHANIZE
+ bool "mechanize 0.2.5"
+ depends on FREETZ_PACKAGE_PYTHON
+ select FREETZ_PACKAGE_PYTHON_MOD_SQLITE
+ select FREETZ_PACKAGE_PYTHON_MOD_SSL
+ select FREETZ_LIB_libpython2 if !FREETZ_PACKAGE_PYTHON_STATIC
+ default n
+ help
+ Stateful programmatic web browsing, after Andy Lester's Perl module WWW::Mechanize.
View
26 make/python-mechanize/patches/010-use_distutils_for_setup.patch
@@ -0,0 +1,26 @@
+--- setup.py
++++ setup.py
+@@ -62,21 +62,13 @@
+ """
+
+ def main():
+- try:
+- import setuptools
+- except ImportError:
+- import ez_setup
+- ez_setup.use_setuptools()
+- import setuptools
+- setuptools.setup(
++ from distutils.core import setup
++ setup(
+ name = "mechanize",
+ version = VERSION,
+ license = "BSD", # or ZPL 2.1
+ platforms = ["any"],
+ classifiers = [c for c in CLASSIFIERS.split("\n") if c],
+- install_requires = [],
+- zip_safe = True,
+- test_suite = "test",
+ author = "John J. Lee",
+ author_email = "jjl@pobox.com",
+ description = __doc__.split("\n", 1)[0],
View
10 make/python-mechanize/patches/020-mechanize_seek.debian.patch
@@ -0,0 +1,10 @@
+--- mechanize/_html.py
++++ mechanize/_html.py
+@@ -621,6 +621,7 @@
+ Factory.set_response(self, response)
+ if response is not None:
+ data = response.read()
++ response.seek(0)
+ soup = self._soup_class(self.encoding, data)
+ self._forms_factory.set_response(
+ copy.copy(response), self.encoding)
View
34 make/python-mechanize/python-mechanize.mk
@@ -0,0 +1,34 @@
+$(call PKG_INIT_BIN, 0.2.5)
+$(PKG)_SOURCE:=mechanize-$($(PKG)_VERSION).tar.gz
+$(PKG)_SOURCE_MD5:=32657f139fc2fb75bcf193b63b8c60b2
+$(PKG)_SITE:=https://pypi.python.org/packages/source/m/mechanize
+
+$(PKG)_DIR:=$($(PKG)_SOURCE_DIR)/mechanize-$($(PKG)_VERSION)
+
+$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)$(PYTHON_SITE_PKG_DIR)/mechanize/__init__.py
+
+$(PKG)_DEPENDS_ON := python
+
+$(PKG)_REBUILD_SUBOPTS += FREETZ_PACKAGE_PYTHON_STATIC
+
+$(PKG_SOURCE_DOWNLOAD)
+$(PKG_UNPACKED)
+$(PKG_CONFIGURED_NOP)
+
+$($(PKG)_TARGET_BINARY): $($(PKG)_DIR)/.configured
+ $(call Build/PyMod/PKG, PYTHON_MECHANIZE)
+ touch -c $@
+
+$(pkg):
+
+$(pkg)-precompiled: $($(PKG)_TARGET_BINARY)
+
+$(pkg)-clean:
+ $(RM) -r $(PYTHON_MECHANIZE_DIR)/build
+
+$(pkg)-uninstall:
+ $(RM) -r \
+ $(PYTHON_MECHANIZE_DEST_DIR)$(PYTHON_SITE_PKG_DIR)/mechanize \
+ $(PYTHON_MECHANIZE_DEST_DIR)$(PYTHON_SITE_PKG_DIR)/mechanize-*.egg-info
+
+$(PKG_FINISH)
View
1 make/python/Config.in
@@ -360,6 +360,7 @@ menu "3rd-party modules"
depends on FREETZ_PACKAGE_PYTHON
source make/python-bjoern/Config.in
source make/python-imaging-library/Config.in
+ source make/python-mechanize/Config.in
source make/python-pycrypto/Config.in
source make/python-pycurl/Config.in
source make/python-pyopenssl/Config.in

0 comments on commit adfef27

Please sign in to comment.
Something went wrong with that request. Please try again.