Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py311-310: Update to latest version #5866

Merged
merged 27 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
293a33a
py311-310: Update to latest version
th0ma7 Sep 2, 2023
61967dd
spk.mk: Add a make pythonclean option to facilitate rebuilds
th0ma7 Sep 2, 2023
35a1027
py311-310: Test building all wheels
th0ma7 Sep 2, 2023
49944c3
py311-310: Disable building all wheels as successful
th0ma7 Sep 3, 2023
e52bdd6
python.mk: Ensure cross/* wheels are being re-processed
th0ma7 Sep 3, 2023
23e033e
homeassistant: Mark as broken until @hgy59 complete PR #5857
th0ma7 Sep 3, 2023
1234710
python38: Remove as deprecated in favor of python 3.10-3.11
th0ma7 Sep 3, 2023
05cefdf
cryptography: Mark armv5 as unsupported due to lack of libatomic
th0ma7 Sep 3, 2023
a683c6c
bazarr: Mark ARMv7L as now unsupported with py311 due to numpy
th0ma7 Sep 3, 2023
ae7c2b9
sabnzbd: Bump package to enforce using newer python
th0ma7 Sep 3, 2023
bdc0574
sickchill: Bump package to enforce using newer python
th0ma7 Sep 3, 2023
2c8cbdf
deluge: Bump package to enforce using newer python
th0ma7 Sep 3, 2023
2ecc100
python311: Mark ARMv5 as unsupported directly within cross
th0ma7 Sep 3, 2023
e9ebc24
python311: Revert setuptools ver for numpy 1.23 in homeassistant
th0ma7 Sep 3, 2023
403aa94
spk.mk: Differenciate pythonclean vs pythoncleanall
th0ma7 Sep 3, 2023
19707d0
beets, borgbackup, mercurial, octoprint, rdiff-backup: ARMv5 removed
th0ma7 Sep 3, 2023
80772d0
python.mk: Fix issue with znc
th0ma7 Sep 3, 2023
7eee6b6
python.mk: Fine-tune include directories and remov bzip2 exception
th0ma7 Sep 4, 2023
b7dda74
python.mk: Additional fixes specific to ZNC
th0ma7 Sep 4, 2023
aa86607
python.mk: Move exceptions to ZNC package directly
th0ma7 Sep 4, 2023
0d07bd7
vim: Migrate to spksrc.python.mk along with python 3.11
th0ma7 Sep 4, 2023
3d815b4
znc: Refer to PYTHON_PACKAGE in BUILD_DEPENDS for cross
th0ma7 Sep 4, 2023
a363ad8
vim: Mark armv5 as unsupported
th0ma7 Sep 4, 2023
eb0a842
vim & python.mk: Proposal to allow creating a vim for all archs
th0ma7 Sep 5, 2023
1a355eb
vim: Apply @hgy59 proposal related to changelog
th0ma7 Sep 6, 2023
59b561d
vim: Added missing include of spksrc.archs.mk for proper ifneq
th0ma7 Sep 6, 2023
5817155
Update spk/vim/Makefile
th0ma7 Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions cross/vim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ PKG_DIST_SITE = https://ftp.nluug.nl/pub/vim/unix
SPECIFIC_VERSION=$(subst .,,$(PKG_VERS))
PKG_DIR = $(PKG_NAME)$(SPECIFIC_VERSION)

BUILD_DEPENDS = cross/$(PYTHON_PACKAGE)
ifeq ($(strip $(PYTHON_PACKAGE)),)
PYTHON_PACKAGE = python311
endif

OPTIONAL_DEPENDS = cross/$(PYTHON_PACKAGE)
DEPENDS = cross/ncursesw

HOMEPAGE = https://www.vim.org/
Expand All @@ -18,13 +22,17 @@ CONFIGURE_ARGS = --with-compiledby=SynoCommunity
CONFIGURE_ARGS += --with-features=huge --with-tlib=ncursesw
CONFIGURE_ARGS += vim_cv_toupper_broken=no vim_cv_terminfo=yes vim_cv_tgetent=zero vim_cv_tty_group=world
CONFIGURE_ARGS += vim_cv_getcwd_broken=yes vim_cv_stat_ignores_slash=yes vim_cv_memmove_handles_overlap=yes

include ../../mk/spksrc.archs.mk

ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
BUILD_DEPENDS = cross/$(PYTHON_PACKAGE)
CONFIGURE_ARGS += --enable-python3interp=dynamic --with-python3-command=$(HOSTPYTHON)
CONFIGURE_ARGS += vi_cv_path_python3_conf=$(PYTHON_CFG_PATH)
CONFIGURE_ARGS += vi_cv_path_python3_pfx=$(PYTHON_PREFIX)
CONFIGURE_ARGS += vi_cv_path_python3_epfx=$(PYTHON_EXEC_PREFIX)
CONFIGURE_ARGS += vi_cv_path_python3path=$(PYTHONPATH)

include ../../mk/spksrc.archs.mk
endif

# Avoid warning that _FORTIFY_SOURCE requires compiling with optimization
ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
Expand All @@ -44,6 +52,7 @@ POST_INSTALL_TARGET = vim_post_install

include ../../mk/spksrc.cross-cc.mk

ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
# Only trigger building of dependencies (for the Python config) for targets where it's used
ifeq ($(strip $(filter-out configure compile install plist all,$(MAKECMDGOALS))),)
$(WORK_DIR)/python-cc.mk: depend ;
Expand All @@ -56,6 +65,7 @@ PYTHON_EXEC_PREFIX = $(STAGING_INSTALL_PREFIX)
PYTHON_CFG_PATH = $(shell $(STAGING_INSTALL_PREFIX)/bin/python3-config --configdir)

ENV += PYTHONPATH=$(PYTHONPATH)
endif

.PHONY: vim_post_install
vim_post_install:
Expand Down
4 changes: 4 additions & 0 deletions mk/spksrc.python.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# set default spk/python* path to use
PYTHON_PACKAGE_ROOT = $(realpath $(shell pwd)/../$(PYTHON_PACKAGE)/work-$(ARCH)-$(TCVERSION))

include ../../mk/spksrc.archs.mk

ifneq ($(wildcard $(PYTHON_PACKAGE_ROOT)),)

# Export the python package variable so it is usable in cross/*
Expand Down Expand Up @@ -54,8 +56,10 @@ PYTHON_DEPENDS := $(foreach cross,$(foreach pkg_name,$(shell $(MAKE) dependency-
PRE_DEPEND_TARGET = python_pre_depend

else
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
BUILD_DEPENDS += cross/$(PYTHON_PACKAGE)
endif
endif

include ../../mk/spksrc.spk.mk

Expand Down
6 changes: 4 additions & 2 deletions spk/vim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ SPK_ICON = src/vim.png

DEPENDS = cross/$(SPK_NAME)
PYTHON_PACKAGE = python311
SPK_DEPENDS = "python311>=3.11.5-8"
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS)

MAINTAINER = SynoCommunity
DESCRIPTION = Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.
Expand All @@ -20,6 +18,10 @@ CHANGELOG = "Update vim to v9.0<br/>2. Migrate to Python 3.11"
HOMEPAGE = https://www.vim.org/
LICENSE = Charityware

ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
SPK_DEPENDS = "python311>=3.11.5-8"
endif

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we keep this dependency optional and remove the SPK_DEPENDS?

So (as before) you can install vim without python, but you can't use the python feature until you install python311.
If one wants to use the python feature, now python311 is needed and can be installed before or after the vim package.

So the changelog must change 2. Migrate to Python 3.11 to 2. You now need Python 3.11 to enable Python support.

Probably it is not enough to mention this in the changelog, and we should add a note (except for ARMv5 and OLD_PPC) to the package description(s) like:

"To enable Python support you need to install the Python 3.11 package"

sorry to remain pedantic, but why sould a user need to install python for the update, when the python feature is not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really was to demonstrate two things:

  1. it's still possible to build vim for armv5
  2. it's also possible to migrate vim to python 3.11

As far as python being optional, I had not looked into that just yet. Indeed it can be but there is a need to provide proper messaging on that matter... And not sure the changlog is the best but certainly is the easiest (wizard perhaps would be better but more complex due to arch build differences?). Personnally I find making it mandatory by default is the simplest and safest.

But AFAIK you seem to object to that therefore I can change this easily by switching SPK_DEPENDS to a changelog += instead. Before I make the necessary changes, would that meet your train of thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hgy59 Would 1a355eb + 59b561d suit your need? I've checked and the INFO looks OK from a " perspective:

$ cat work-88f6281-6.2.4/INFO 
package="vim"
version="9.0-6"
description="Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems."
description_csy="Vim je pokročilý textový editor, který usiluje o to poskytnout sílu de-facto Unixového editoru Vi, s komplexnější sadou vlastností."
description_fre="Vim est un éditeur de texte avancé basé sur Vi (unix) avec des fonctions plus complètes."

arch="88f6281"
maintainer="SynoCommunity"
maintainer_url="https://github.com/SynoCommunity"
distributor=""
distributor_url=""
os_min_ver="6.2-25556"
helpurl="https://www.vim.org/"
ctl_stop="no"
displayname="Vim"
dsmappname="com.synocommunity.packages.vim"
changelog="1. Update vim to v9.0"
checksum="2d40a3b4be313ac1f3f7737fb25b698b"
$ cat work-x64-7.1/INFO 
package="vim"
version="9.0-6"
description="Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems."
description_csy="Vim je pokročilý textový editor, který usiluje o to poskytnout sílu de-facto Unixového editoru Vi, s komplexnější sadou vlastností."
description_fre="Vim est un éditeur de texte avancé basé sur Vi (unix) avec des fonctions plus complètes."

arch="apollolake avoton braswell broadwell broadwellnk broadwellnkv2 broadwellntbap bromolow cedarview denverton epyc7002 geminilake grantley kvmx64 purley r1000 v1000"
maintainer="SynoCommunity"
maintainer_url="https://github.com/SynoCommunity"
distributor=""
distributor_url=""
os_min_ver="7.1-42661"
helpurl="https://www.vim.org/"
ctl_stop="no"
displayname="Vim"
dsmappname="com.synocommunity.packages.vim"
changelog="1. Update vim to v9.0 <br/>2. Migrate to Python 3.11 <br/><br/>NOTE: You need to install Python 3.11 package to enable Python support."
checksum="721d1b9df75c45c26927d4dcfef56b52"

SPK_COMMANDS = bin/vim bin/vim$(subst .,,$(SPK_VERS)) bin/view bin/vimdiff bin/rvim bin/rview bin/vimtutor

include ../../mk/spksrc.python.mk