[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 2ebff0e 093/439: Use README.{rst,md,org}; Auto-gener
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 2ebff0e 093/439: Use README.{rst,md,org}; Auto-generate foo-pkg.el. |
Date: |
Sun, 17 Oct 2021 15:47:40 -0400 (EDT) |
branch: elpa-admin
commit 2ebff0e724d4a3678b93b3aa389b120148eec69b
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Use README.{rst,md,org}; Auto-generate foo-pkg.el.
---
admin/archive-contents.el | 41 ++++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index fcc7071..072d03f 100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -76,9 +76,10 @@ Delete backup files also."
(archive--delete-elc-files dir)
;; Test whether this is a simple or multi-file package.
(setq simple-p (archive--simple-package-p dir pkg))
- (push (if simple-p
+ (push (if (car simple-p)
(apply #'archive--process-simple-package
- dir pkg simple-p)
+ dir pkg (cdr simple-p))
+ (apply 'archive--write-pkg-file dir pkg (cdr simple-p))
(archive--process-multi-file-package dir pkg))
packages)))
(error (error "Error in %s: %S" dir v))))
@@ -147,24 +148,20 @@ Currently only refreshes the ChangeLog files."
(defun archive--simple-package-p (dir pkg)
"Test whether DIR contains a simple package named PKG.
-If so, return a list (VERSION DESCRIPTION REQ), where
-VERSION is the version string of the simple package, DESCRIPTION
-is the brief description of the package, REQ is a list of
-requirements.
+Return a list (SIMPLE VERSION DESCRIPTION REQ), where
+SIMPLE is non-nil if the package is indeed simple;
+VERSION is the version string of the simple package;
+DESCRIPTION is the brief description of the package;
+REQ is a list of requirements.
Otherwise, return nil."
(let* ((pkg-file (expand-file-name (concat pkg "-pkg.el") dir))
(mainfile (expand-file-name (concat pkg ".el") dir))
- (files (directory-files dir nil archive-re-no-dot))
+ (files (directory-files dir nil "\\.el\\'"))
version description req)
- (dolist (file (prog1 files (setq files ())))
- (unless (string-match "\\(?:\\.elc\\|~\\)\\'" file)
- (push file files)))
(setq files (delete (concat pkg "-pkg.el") files))
(setq files (delete (concat pkg "-autoloads.el") files))
- (setq files (delete "ChangeLog" files))
(cond
- ((and (or (not (file-exists-p pkg-file))
- (= (length files) 1))
+ ((and (not (file-exists-p pkg-file))
(file-exists-p mainfile))
(with-temp-buffer
(insert-file-contents mainfile)
@@ -181,7 +178,7 @@ Otherwise, return nil."
(if requires-str
(setq req (mapcar 'archive--convert-require
(car (read-from-string requires-str))))))
- (list version description req))))
+ (list (= (length files) 1) version description req))))
((not (file-exists-p pkg-file))
(error "Can find single file nor package desc file in %s" dir)))))
@@ -266,7 +263,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(if simple-p
(progn
;; (message "Refreshing pkg description of %s" pkg)
- (apply 'archive--write-pkg-file dir pkg simple-p))
+ (apply 'archive--write-pkg-file dir pkg (cdr simple-p)))
;; (message "Not refreshing pkg description of %s" pkg)
)))
@@ -336,6 +333,13 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(lm-header prop))))))
(defun archive--get-section (hsection fsection srcdir mainsrcfile)
+ (when (consp fsection)
+ (while (cdr-safe fsection)
+ (setq fsection
+ (if (file-readable-p (expand-file-name (car fsection) srcdir))
+ (car fsection)
+ (cdr fsection))))
+ (when (consp fsection) (setq fsection (car fsection))))
(cond
((file-readable-p (expand-file-name fsection srcdir))
(with-temp-buffer
@@ -409,7 +413,10 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(when maint
(insert (format "<p>Maintainer: %s</p>\n" (archive--quote maint)))))
(archive--insert-repolinks name srcdir mainsrcfile)
- (let ((readme (archive--get-section "Commentary" "README" srcdir
mainsrcfile)))
+ (let ((readme (archive--get-section "Commentary"
+ '("README" "README.rst" "README.md"
+ "README.org")
+ srcdir mainsrcfile)))
(when readme
(write-region readme nil (concat name "-readme.txt"))
(insert "<h2>Full description</h2><pre>\n" (archive--quote readme)
@@ -471,7 +478,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
;;; Maintain external packages.
-(defconst archive--elpa-git-url "git+ssh://git.sv.gnu.org/srv/git/emacs/elpa")
+(defconst archive--elpa-git-url "git://git.sv.gnu.org/emacs/elpa")
(defun archive-add/remove/update-externals ()
(let ((exts (with-current-buffer (find-file-noselect "externals-list")
- [nongnu] elpa-admin 45792fe 051/439: Remove version numbers from filenames in packages/ dir., (continued)
- [nongnu] elpa-admin 45792fe 051/439: Remove version numbers from filenames in packages/ dir., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5319f2f 062/439: * archive-contents.el: Make `site' more incrementally., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin becd7be 063/439: * archive-contents.el (archive--make-changelog): New fun., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 6c94727 068/439: archive-contents.el (archive--simple-package-p): Fix prop-line matching., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin dc8ca2b 072/439: Note availability of Melpa packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 518362a 073/439: Merge pull request #13 from dgutov/master, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 50b05c8 074/439: Add SML-mode., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 4eaf276 078/439: * admin/archive-contents.el (batch-make-archive): Don't demote errors., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b7f2140 081/439: Thanks go to Lars Andersen., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 87dd559 092/439: Update infrastructure for Git., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 2ebff0e 093/439: Use README.{rst,md,org}; Auto-generate foo-pkg.el.,
Philip Kaludercic <=
- [nongnu] elpa-admin 55c3f5d 100/439: Add YAsnippet metadata., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 73304d8 097/439: Fix up deployment script, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c8efad2 096/439: Fix up copyrights and the checking code, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 4f4a301 104/439: * GNUmakefile: Obey a .elpaignore file in a package's root directory., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e38e391 108/439: Use lm-keywords-list instead of split-string for archive contents., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7db4e2d 112/439: small updates to README and NOTES, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b84cae0 119/439: * archive-contents.el (archive--simple-package-p): Quote the, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 876bb45 128/439: Merge git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e52215f 124/439: first commit, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a0b6599 127/439: Subject: Fix up quoting of keywords. Remove leftover support for *-pkg.el., Philip Kaludercic, 2021/10/17