Bug 255656 - net/py-pysocks: Does not build due to patch to setup.py
Summary: net/py-pysocks: Does not build due to patch to setup.py
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-06 12:43 UTC by Adam Jimerson
Modified: 2021-05-18 23:28 UTC (History)
0 users

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


Attachments
setup.py (1.36 KB, text/plain)
2021-05-17 23:41 UTC, Adam Jimerson
no flags Details
setup.py.orig (1.36 KB, text/plain)
2021-05-17 23:42 UTC, Adam Jimerson
no flags Details
setup.py.rej (518 bytes, text/plain)
2021-05-17 23:43 UTC, Adam Jimerson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Jimerson 2021-05-06 12:43:24 UTC
Currently I'm not able to build net/py-pysocks on 11.4-RELEASE, 12.2-RELEASE, 13.0-RELEASE on amd64 due to the patch supplied by the port being rejected:

poudriere testport output:

> =======================<phase: extract        >============================
> ===>  License BSD3CLAUSE accepted by the user
> ===>   py37-pysocks-1.7.1 depends on file: /usr/local/sbin/pkg - found
> ===> Fetching all distfiles required by py37-pysocks-1.7.1 for building
> ===>  Extracting for py37-pysocks-1.7.1
> => SHA256 Checksum OK for PySocks-1.7.1.tar.gz.
> ===========================================================================
> =======================<phase: patch-depends  >============================
> ===========================================================================
> =======================<phase: patch          >============================
> ===>  Patching for py37-pysocks-1.7.1
> ===>  Applying FreeBSD patches for py37-pysocks-1.7.1 from /usr/ports/net/py-pysocks/files
> Ignoring previously applied (or reversed) patch.
> 1 out of 1 hunks ignored--saving rejects to setup.py.rej
> ===>  FAILED Applying FreeBSD patch-setup.py
> ===> Cleanly applied FreeBSD patch(es)  patch-setup.py
> ===> FAILED to apply cleanly FreeBSD patch(es)  patch-setup.py
> *** Error code 1

setup.py.rej contents:

> @@ -32,12 +32,12 @@
>      py_modules=["socks", "sockshandler"],
>      install_requires=requirements,
>      python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
> -    classifiers=(
> +    classifiers=[
>          "Programming Language :: Python :: 2",
>          "Programming Language :: Python :: 2.7",
>          "Programming Language :: Python :: 3",
>          "Programming Language :: Python :: 3.4",
>          "Programming Language :: Python :: 3.5",
>          "Programming Language :: Python :: 3.6",
> -    ),
> +    ],
>  )
Comment 1 Po-Chuan Hsieh freebsd_committer 2021-05-09 16:22:10 UTC
I cannot reproduce this.

You could check the setup.py [1]. I even had submitted the patch to upstream [2].

[1] https://github.com/Anorov/PySocks/blob/master/setup.py
[2] https://github.com/Anorov/PySocks/pull/144
Comment 2 Adam Jimerson 2021-05-17 23:41:23 UTC
That is very odd as in the poudriere build jail's working directory it does look like the patch did apply, but there is something else going on that is causing the patch step to fail as I see the following files for setup.py: setup.py, setup.py.orig, setup.py.rej. The contents of setup.py.orig matches https://github.com/Anorov/PySocks/blob/master/setup.py while setup.py looks like that with the patch correctly applied. I don't know if it is a problem with the port or with poudiere itself.
Comment 3 Adam Jimerson 2021-05-17 23:41:57 UTC
Created attachment 225042 [details]
setup.py

This is the contents of setup.py from my build jail.
Comment 4 Adam Jimerson 2021-05-17 23:42:29 UTC
Created attachment 225043 [details]
setup.py.orig

This is the content of setup.py.orig from my build jail.
Comment 5 Adam Jimerson 2021-05-17 23:43:03 UTC
Created attachment 225044 [details]
setup.py.rej

Contents of setup.py.rej from my build jail.
Comment 6 Adam Jimerson 2021-05-18 23:28:33 UTC
Okay so the issue seems to be something with my ports tree, I deleted it and recreated it with poudriere and this port builds fine now.