[Bug 242463] devel/mercurial: Update to 5.2.1

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242463

--- Comment #5 from Peter Wullinger  ---
(In reply to Kubilay Kocak from comment #4)

Thanks for the pointers.

The main remaining culprit seems to be mercurial/__modulepolicy__.py, which
gets not included in the autoplist. I need to include it without having
separate plists.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242463] devel/mercurial: Update to 5.2.1

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242463

--- Comment #6 from Kubilay Kocak  ---
(In reply to Peter Wullinger from comment #5)

Yeh, I believe I was looking at this a number of weeks back.

module policy is treated specially, in setup.py [1]:

class hgbuildpy(build_py):
...
def run(self):
...
write_if_changed(os.path.join(basepath, '__modulepolicy__.py'),
content)


[1] https://www.mercurial-scm.org/repo/hg-committed/file/tip/setup.py#l644

Technically, its a packaging bug, as all created files (especially manual ones)
need to be added to the list of output files, so they are included in setup.py
install --record output, which autoplist uses

This is a common issue with packages that do/execute custom things, see

https://github.com/skorokithakis/tbvaccine/blob/master/setup.py#L14

https://stackoverflow.com/questions/25686900/pip-install-misses-some-generated-files-when-writing-installed-files-txt

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242463] devel/mercurial: Update to 5.2.1

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242463

--- Comment #7 from Kubilay Kocak  ---
(In reply to Kubilay Kocak from comment #6)

Web searches for: "self.outputs" setup.py returns lots of results

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242997] games/oolite: Fix build for Python 3.x

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242997

lightside  changed:

   What|Removed |Added

 Attachment #210343|0   |1
is obsolete||

--- Comment #3 from lightside  ---
Created attachment 210354
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=210354&action=edit
Proposed patch (since 520894 revision)

- Cosmetic changes.

Hello, Kubilay Kocak.

(In reply to Kubilay Kocak from comment #2)
> Could you please:
> 
>  - Submit this patch upstream as an issue or pull request, and include the
> issue/PR URL in the See Also field
Sorry, but I can't (or not interested). There is no patch. There are only
(temporary) dynamic changes with using 2to3 script, provided by Python
installation.
But if remove "--no-diffs" option for invocation of 2to3 script, it shows
changes for usage of print function:
-8<--
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored imacro_asm.py
--- imacro_asm.py   (original)
+++ imacro_asm.py   (refactored)
@@ -456,7 +456,7 @@
 if __name__ == '__main__':
 import sys
 if len(sys.argv) != 3:
-print "usage: python imacro_asm.py infile.jsasm outfile.c.out"
+print("usage: python imacro_asm.py infile.jsasm outfile.c.out")
 sys.exit(1)

 f = open(sys.argv[2], 'w')
RefactoringTool: Refactored build/cl.py
--- build/cl.py (original)
+++ build/cl.py (refactored)
@@ -51,7 +51,7 @@
 break

 if target == None:
-print >>sys.stderr, "No target set" and sys.exit(1)
+print("No target set" and sys.exit(1), file=sys.stderr)

 # The deps target lives here
 depstarget = os.path.basename(target) + ".pp"
@@ -90,7 +90,7 @@

 f = open(depstarget, "w")
 for dep in sorted(deps):
-print >>f, "%s: %s" % (target, dep)
+print("%s: %s" % (target, dep), file=f)

 if __name__ == "__main__":
 InvokeClWithDependencyGeneration(sys.argv[1:])
RefactoringTool: Files that were modified:
RefactoringTool: imacro_asm.py
RefactoringTool: build/cl.py
-->8-

Also, the custom version of SpyderMonkey is just a external dependency for
OOlite, if looking for source code:
https://github.com/OoliteProject/oolite/tree/1.88/deps
https://github.com/OoliteProject/spidermonkey-ff4/blob/ca2fb5423fab4d72a3dc5fec911ce20bda01f223/README.txt

I guess, if developers may want to support Python 3.x version, they can do this
with using 2to3 script, if needed. There is no defect and it normally works
with using Python 2.x version. This is just a build dependency.

> - Confirm that this change passes QA (poudriere)
It passes build with using Python 3.x version:
-8<--
% make PYTHON_VERSION=3.6 clean check-plist
<..>
Configuring Javascript library...

mkdir -p deps/mozilla/js/src/build-release
<..>
checking for python2.7... (cached) /usr/local/bin/python3.6
<..>
checking for Python version >= 2.5... yes
<..>
> Compressing man pages (compress-man)
> Running Q/A tests (stage-qa)
> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
-->8-

> Please include an update to the MAINTAINER line if you can
Thanks, but I interested in this PR only.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242895] devel/py-robotframework-pabot: Update to 0.96

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242895

Koichiro Iwao  changed:

   What|Removed |Added

 CC||m...@freebsd.org
   Assignee|ports-b...@freebsd.org  |m...@freebsd.org
 Status|Open|In Progress

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242895] devel/py-robotframework-pabot: Update to 0.96

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242895

--- Comment #1 from commit-h...@freebsd.org ---
A commit references this bug:

Author: meta
Date: Tue Dec 31 13:13:56 UTC 2019
New revision: 521616
URL: https://svnweb.freebsd.org/changeset/ports/521616

Log:
  devel/py-robotframework-pabot: Update to 0.96

  PR:   242895
  Submitted by: maintainer

Changes:
  head/devel/py-robotframework-pabot/Makefile
  head/devel/py-robotframework-pabot/distinfo

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242895] devel/py-robotframework-pabot: Update to 0.96

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242895

Koichiro Iwao  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|In Progress |Closed

--- Comment #2 from Koichiro Iwao  ---
Committed, thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242463] devel/mercurial: Update to 5.2.1

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242463

Peter Wullinger  changed:

   What|Removed |Added

 Attachment #210328|0   |1
is obsolete||

--- Comment #8 from Peter Wullinger  ---
Created attachment 210359
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=210359&action=edit
Python 3 support + FreeBSD authormapsuffix map + plist fixes

Updates patch for Python 3 support

- enable USE_PYTHON= concurrent
- bring back omitted authormapsuffix patch
- add PKGNAMESUFFIX=${PYTHON_PKGNAMESUFFIX}
- add setup.py patch for keeping track of __modulepolicy__.py

This makes the port into mercurial@py37 and mercurial@py27.
Given that we are 6 hours till Python 2 EOL, I would consider

py27_PKGNAMESUFFIX=

instead. This makes the Python 3 flavor the default and the Python 2 flavor use
the suffix:

mercurial-py27-5.2.1.txz
mercurial-5.2.1.txz

Checks done:
- pkg-plist for py27 and py37 look okay
- parallel install of both packages (py37 flavor has non-prefixed files)

local poudriere builds (testport)
12.1/amd64: @py27
12.1/amd64: @py37

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


Re: Help with porting Python libraries

2019-12-31 Thread Andrea Venturoli

On 2019-12-30 03:26, Kubilay Kocak wrote:

Thanks to all that replied.
Especially the link to Python Ports Policy & Guidelines/Tips was very 
useful, as I hadn't found this myself :(


I tried to follow all your suggestions, but I'm having some problems 
with it...






Using CHEESESHOP

I removed USE_GITHUB, GH_ACCOUNT and GH_PROJECT, and added 
"MASTER_SITES=	CHEESESHOP".

However, running make makesum I get:

# make makesum
===>  License BSD3CLAUSE accepted by the user
===>  License BSD3CLAUSE accepted by the user
===>   py36-imapclient-2.1.0 depends on file: /usr/local/sbin/pkg - found
=> imapclient-2.1.0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch 
https://files.pythonhosted.org/packages/source/i/imapclient/imapclient-2.1.0.tar.gz
fetch: 
https://files.pythonhosted.org/packages/source/i/imapclient/imapclient-2.1.0.tar.gz:
 Not Found
=> Attempting to fetch 
https://pypi.org/packages/source/i/imapclient/imapclient-2.1.0.tar.gz
fetch: https://pypi.org/packages/source/i/imapclient/imapclient-2.1.0.tar.gz: 
Not Found
=> Attempting to fetch 
http://distcache.FreeBSD.org/ports-distfiles/imapclient-2.1.0.tar.gz
fetch: http://distcache.FreeBSD.org/ports-distfiles/imapclient-2.1.0.tar.gz: 
Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1


I'm not just into it enought to understand what I have to do to solve.




Tests

In setup.py, I see:

test_deps = ['mock>=1.3.0; python_version < "3.4"']


I think I have to put in Makefile:

TEST_DEPENDS=   ${PYTHON_PKGNAMEPREFIX}mock>1.3.0:devel/py-mock@${PY_FLAVOR}


However I don't know how to handle that <"3.4"...



Then I wrote:

do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test


Is this correct?



Finally, tests fail:

# make test
===>  Patching for py36-imapclient-2.1.0
===>   py36-imapclient-2.1.0 depends on package: py36-setuptools>0 - found
===>   py36-imapclient-2.1.0 depends on file: /usr/local/bin/python3.6 - found
...
test_invalid (tests.test_datetime_util.TestParsing) ... ok
test_rfc822_style (tests.test_datetime_util.TestParsing) ... ok

==
FAIL: test_redacted_password (tests.test_imapclient.TestDebugLogging)
--
Traceback (most recent call last):
  File 
"/usr/ports/mail/py-IMAPClient/work-py36/imapclient-2.1.0/tests/test_imapclient.py",
 line 521, in test_redacted_password
extra={}
  File "/usr/local/lib/python3.6/unittest/mock.py", line 824, in 
assert_called_once_with
raise AssertionError(msg)
AssertionError: Expected '_log' to be called once. Called 0 times.

--
Ran 254 tests in 0.115s

FAILED (failures=1)
Test failed: 
error: Test failed: 
*** Error code 1

Stop.
make: stopped in /usr/ports/mail/py-IMAPClient


Is this my fault, a problem upstream, a problem in some dependency?





Docs

I'm trying to learn by example, here, so I looked at a couple of ports 
and came up with the Makefile I'll post at the end.


Troubles:
_ this way, documentation files are not in the plist, and "port test" 
obviously complains.

_ Documentation files are not versioned: do I need to use "concurrent" then?
_ If I run "port test" without py36-sphinx installed, it doesn't work; 
shouldn't it install this as a dependency (and remove it afterwards)?




 bye & Thanks
av.






# $FreeBSD$

PORTNAME=   imapclient
PORTVERSION=2.1.0
CATEGORIES= mail python
#MASTER_SITES=  CHEESESHOP
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= m...@netfence.it
COMMENT=Easy-to-use, Pythonic and complete IMAP client library

LICENSE=BSD3CLAUSE
LICENSE_FILE=   ${WRKSRC}/COPYING

RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
TEST_DEPENDS=   ${PYTHON_PKGNAMEPREFIX}mock>1.3.0:devel/py-mock@${PY_FLAVOR}

USES=   python:2.7-3.7
USE_GITHUB= yes
USE_PYTHON= autoplist distutils
GH_ACCOUNT= mjs
GH_PROJECT= imapclient
NO_ARCH=yes

OPTIONS_DEFINE= DOCS

DOCS_BUILD_DEPENDS= 
${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR}
DOCS_VARS=  PYDISTUTILS_BUILD_TARGET+="build_sphinx -a -E"

post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/doc/html && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "! -name 
.buildinfo -and ! -name objects.inv")

do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test

.include 

___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"


[Bug 242463] devel/mercurial: Update to 5.2.1

2019-12-31 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242463

--- Comment #9 from Kubilay Kocak  ---
(In reply to Peter Wullinger from comment #8)

Great patch Peter, thank you

One thing left is to check the pkg-plist (make makeplist) for any leftover
files not processed by USE_PYTHON=concurrent to ensure there's none that are
still installed in common/shared (non Python-version-specific) locations.

>From the updated patch it looks like (at least) the manual pages will still
conflict, and need to be processed with concurrent as well:

man/man1/hg.1.gz
man/man5/hgignore.5.gz
man/man5/hgignore.5.gz
man/man5/hgrc.5.gz
man/man5/hgrc.5.gz

You should be able to do this by extending UNIQUE_SUFFIX_FILES (or
UNIQUE_FIND_SUFFIX_FILES, or UNIQUE_SUFFIX_TYPES (See Mk/Uses/uniquefiles.mk
examples and how Mk/Uses/python.mk uses uniquefiles)

We also need to check that any and all python scripts that are installed use
the specific Python-version executable the port was built with in their shebang
lines. 

Any that aren't handled by setuptools automatic shebang processing (via
setup.py:console_scripts/scripts methods) need to be processed with
USES=shebangfix

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"