[126965] trunk/dports/python/py-mssql

petr at macports.org petr at macports.org
Sat Oct 18 07:19:30 PDT 2014


Revision: 126965
          https://trac.macports.org/changeset/126965
Author:   petr at macports.org
Date:     2014-10-18 07:19:30 -0700 (Sat, 18 Oct 2014)
Log Message:
-----------
py-mssql: update to 2.1.0, remove py24, py25 subport, add py34, switch to PyPI repo, modify homepage, livecheck

Modified Paths:
--------------
    trunk/dports/python/py-mssql/Portfile

Added Paths:
-----------
    trunk/dports/python/py-mssql/files/patch-setup.py.diff

Removed Paths:
-------------
    trunk/dports/python/py-mssql/files/patch-setup.py

Modified: trunk/dports/python/py-mssql/Portfile
===================================================================
--- trunk/dports/python/py-mssql/Portfile	2014-10-18 13:08:29 UTC (rev 126964)
+++ trunk/dports/python/py-mssql/Portfile	2014-10-18 14:19:30 UTC (rev 126965)
@@ -4,8 +4,11 @@
 PortSystem          1.0
 PortGroup           python 1.0
 
+set _name           pymssql
+set _n              [string index ${_name} 0]
+
 name                py-mssql
-version             1.0.2
+version             2.1.0
 categories-append   databases
 license             LGPL-2.1+
 platforms           darwin
@@ -14,22 +17,30 @@
 description         A simple database interface to MS-SQL for Python.
 long_description    ${description}
 
-homepage            http://pymssql.sourceforge.net/
-master_sites        sourceforge:pymssql
-distname            pymssql-${version}
+homepage            http://pymssql.org
+master_sites        https://pypi.python.org/packages/source/${_n}/${_name}/
+distname            ${_name}-${version}
 
-checksums           md5    04dc4aa591acacbc8f183daeea21b690 \
-                    sha1    e35b1a68285728cfe06b193c57c13059e65f5691 \
-                    rmd160 9130ac3e8a7e489470e8411750c07e91a2a30da7
+checksums           md5     e955442a8cd43456cdf5c28b75147afb \
+                    rmd160  4a66ad05af080684b5aa9f4096819a0523c13556 \
+                    sha256  7dbfcf8de21be1f34164a7f26f1d573b0e4c0bad5804a62f8997b99fe91ece5d
 
-python.versions	24 25 26
+python.versions	26 27 34
 
 if {${name} ne ${subport}} {
-    depends_lib-append	port:freetds
+    depends_build-append    port:py${python.version}-setuptools \
+                            port:py${python.version}-cython
 
-    patchfiles	    patch-setup.py
+    depends_lib-append  port:freetds
 
+    patchfiles	    patch-setup.py.diff
+
     post-patch {
-        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
+        reinplace "s|@MP_PREFIX@|${prefix}|g" ${worksrcpath}/setup.py
     }
+    livecheck.type  none
+} else {
+    livecheck.type  regex
+    livecheck.url   [lindex ${master_sites} 0]
+    livecheck.regex ">${_name}-(\\d+(\\.\\d+)+)\\${extract.suffix}<"
 }

Deleted: trunk/dports/python/py-mssql/files/patch-setup.py
===================================================================
--- trunk/dports/python/py-mssql/files/patch-setup.py	2014-10-18 13:08:29 UTC (rev 126964)
+++ trunk/dports/python/py-mssql/files/patch-setup.py	2014-10-18 14:19:30 UTC (rev 126965)
@@ -1,23 +0,0 @@
---- setup.py.orig	2009-02-05 07:11:49.000000000 +0900
-+++ setup.py	2009-04-28 14:12:21.000000000 +0900
-@@ -81,18 +81,10 @@
- 
- else:	# try some generic paths
- 	include_dirs = [
--		'/usr/local/include', '/usr/local/include/freetds',  # first local install
--		'/usr/include', '/usr/include/freetds',   # some generic Linux paths
--		'/usr/include/freetds_mssql',             # some versions of Mandriva 
--		'/usr/local/freetds/include',             # FreeBSD
--		'/usr/pkg/freetds/include'	              # NetBSD
-+		'__PREFIX__/include', '__PREFIX__/include/freetds'
- 	]
- 	library_dirs = [
--		'/usr/local/lib', '/usr/local/lib/freetds',
--		'/usr/lib', '/usr/lib/freetds',
--		'/usr/lib/freetds_mssql', 
--		'/usr/local/freetds/lib',
--		'/usr/pkg/freetds/lib'
-+		'__PREFIX__/lib', '__PREFIX__/lib/freetds'
- 	]
- 	libraries = [ "sybdb" ]   # on Mandriva you may have to change it to sybdb_mssql
- 	data_files = []

Added: trunk/dports/python/py-mssql/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py-mssql/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py-mssql/files/patch-setup.py.diff	2014-10-18 14:19:30 UTC (rev 126965)
@@ -0,0 +1,35 @@
+--- setup.orig.py
++++ setup.py
+@@ -183,26 +183,17 @@
+ 
+ usr_local = '/usr/local'
+ if osp.exists(usr_local):
+-    add_dir_if_exists(
+-        include_dirs,
+-        osp.join(usr_local, 'include'),
+-        osp.join(usr_local, 'include/freetds'),
+-        osp.join(usr_local, 'freetds/include')
+-    )
+-    add_dir_if_exists(
+-        library_dirs,
+-        osp.join(usr_local, 'lib'),
+-        osp.join(usr_local, 'lib/freetds'),
+-        osp.join(usr_local, 'freetds/lib')
+-    )
++    # 2014-10-18, petr, do not link against /usr/local
++    pass
+ 
+ if sys.platform == 'darwin':
+     fink = '/sw'
+     if osp.exists(fink):
+-        add_dir_if_exists(include_dirs, osp.join(fink, 'include'))
+-        add_dir_if_exists(library_dirs, osp.join(fink, 'lib'))
++        # 2014-10-18, petr, do not link against /sw (fink)
++        pass
+ 
+-    macports = '/opt/local'
++    # 2014-10-18, petr, avoid hard-conding prefix
++    macports = '@MP_PREFIX@'
+     if osp.exists(macports):
+         # some mac ports paths
+         add_dir_if_exists(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141018/063bfae1/attachment.html>


More information about the macports-changes mailing list