ghdl 0.4.8__py3-none-any.whl → 0.4.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ghdl/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
- __version__ = "0.4.8"
1
+ __version__ = "0.4.10"
2
2
 
3
3
  from ghdl.main import main, set_dry, set_single
ghdl/config.hy CHANGED
@@ -31,10 +31,9 @@
31
31
 
32
32
  (setv record.asset-filter (get info "asset_filter"))
33
33
 
34
- (if (not (in "name" info))
35
- (setv record.name
36
- (-> record.repo (.split "/") (get 1)))
37
- (setv record.name (get info "name")))
34
+ (if (in "name" info)
35
+ (setv record.name (get info "name"))
36
+ (setv record.name (-> record.repo (.split "/") (get 1))))
38
37
 
39
38
  (setv record.release-filter (.get info "release_filter" None))
40
39
 
ghdl/main.hy CHANGED
@@ -30,7 +30,7 @@
30
30
  (for [[asset url] url_data]
31
31
  (when (f asset)
32
32
  (return url))))
33
-
33
+
34
34
  (if (isinstance asset-filter str)
35
35
  (do
36
36
  (setv pattern (re.compile asset-filter re.IGNORECASE))
@@ -71,7 +71,7 @@
71
71
  (setv record.toUpdate? False))))
72
72
 
73
73
 
74
- (defn check-single [repo]
74
+ (defn skip-single [repo]
75
75
  (as-> Config.single it
76
76
  (and it (!= repo it))))
77
77
 
@@ -88,7 +88,7 @@
88
88
 
89
89
 
90
90
  (defn :async fetch-remote-local-metadata-1 [record client]
91
- (when (check-single record.repo) (return))
91
+ (when (skip-single record.repo) (return))
92
92
  (when (and record.pin (not (= (platform.machine) record.pin))) (return))
93
93
 
94
94
  (await (add-remote-metadata record client))
@@ -98,7 +98,7 @@
98
98
 
99
99
  (defn process-loop [records]
100
100
  (for [record records]
101
- (when (check-single record.repo) (continue))
101
+ (when (skip-single record.repo) (continue))
102
102
  (when (and record.pin (not (= (platform.machine) record.pin))) (continue))
103
103
 
104
104
  (when record.toUpdate?
@@ -142,6 +142,7 @@
142
142
  (setv Config.dry-run True))
143
143
 
144
144
 
145
+ ;; If a repo is deleted from config, then running this just deletes entry from DB
145
146
  (defn set-single [repo]
146
147
  (local-db.delete-row repo)
147
148
  (setv Config.single repo))
ghdl/remote.hy CHANGED
@@ -20,13 +20,13 @@
20
20
  (-> timestring (dateutil.parser.parse) (.strftime "%s") (int)))
21
21
 
22
22
 
23
- (defn find-matching-release [resp release-filter]
23
+ (defn find-matching-release [resp record]
24
+ (setv pattern (re.compile record.release-filter))
24
25
  (for [release resp]
25
- (setv name (get release "name"))
26
- (setv pattern (re.compile release-filter))
27
- (when (bool (re.search pattern name))
26
+ (when (and (bool (re.search pattern (get release "name")))
27
+ (= (get release "prerelease") record.pre-release?))
28
28
  (return release)))
29
- (print f"No matching release found for: {release-filter}")
29
+ (print f"No matching release found for: {record.release-filter}")
30
30
  (raise NoMatchingReleaseException))
31
31
 
32
32
 
@@ -37,7 +37,7 @@
37
37
  (setv resp (.json (await (client.get api :headers headers))))
38
38
  (cond
39
39
  record.pre-release? (get resp 0)
40
- record.release-filter (find-matching-release resp record.release-filter)
40
+ record.release-filter (find-matching-release resp record)
41
41
  True resp))
42
42
 
43
43
 
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: ghdl
3
- Version: 0.4.8
3
+ Version: 0.4.10
4
4
  Summary: Binary Manager for Github Releases
5
5
  Author-email: Imran Khan <imran@khan.ovh>
6
- License: GNU AFFERO GENERAL PUBLIC LICENSE
6
+ License: GNU AFFERO GENERAL PUBLIC LICENSE
7
7
  Version 3, 19 November 2007
8
8
 
9
9
  Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
@@ -664,15 +664,13 @@ License: GNU AFFERO GENERAL PUBLIC LICENSE
664
664
  if any, to sign a "copyright disclaimer" for the program, if necessary.
665
665
  For more information on this, and how to apply and follow the GNU AGPL, see
666
666
  <https://www.gnu.org/licenses/>.
667
-
668
- Requires-Python: <3.13,>=3.8
669
667
  License-File: LICENSE
670
- Requires-Dist: xtract ==0.1a3
671
- Requires-Dist: xdg >=4.0.1
672
- Requires-Dist: python-dateutil >=2.8.1
673
- Requires-Dist: docopt >=0.6.2
674
- Requires-Dist: python-magic >=0.4.25
675
- Requires-Dist: hyrule >=0.7.0
676
- Requires-Dist: hy >=1.0.0
677
- Requires-Dist: httpx >=0.27.0
678
-
668
+ Requires-Python: <3.14,>=3.8
669
+ Requires-Dist: docopt>=0.6.2
670
+ Requires-Dist: httpx>=0.27.0
671
+ Requires-Dist: hy>=1.0.0
672
+ Requires-Dist: hyrule>=0.7.0
673
+ Requires-Dist: python-dateutil>=2.8.1
674
+ Requires-Dist: python-magic>=0.4.25
675
+ Requires-Dist: xdg>=4.0.1
676
+ Requires-Dist: xtract==0.1a3
@@ -0,0 +1,11 @@
1
+ ghdl/__init__.py,sha256=4k8UKZNZ1Khk_RiSMF6XwUd1rrN3U6i1jnEBx7IYfaE,72
2
+ ghdl/config.hy,sha256=Phq5jyoTizCGQMVtVFljx1MByqo9rBLaciZ69PsS-IE,1550
3
+ ghdl/local.hy,sha256=1StKPJ-l3mo6QdtaYfwL9FvZK97MdYIHrRRSF6S06OU,1687
4
+ ghdl/main.hy,sha256=D1dNJPeW-X0WRbh7974Oecxc_LtLH_AJGgBR5kiNuPc,4710
5
+ ghdl/remote.hy,sha256=is-pU8qxVk8rckxRY6Y3YAJCEl49klC2kfV-KoT7ADg,1610
6
+ ghdl/schema.hy,sha256=sXKjpaBVzBAPAx8Ko3RbCJB2GGbE5pilx-E3gVHtFMY,708
7
+ ghdl/utils.hy,sha256=DZpjuemTpuyex-2ShLRyNxMzMKPM0jia9CCnqMdizfA,1604
8
+ ghdl-0.4.10.dist-info/METADATA,sha256=CifkRc8mjkHdufc258RGm-pLlsCKYCThybBkx2ISRro,40239
9
+ ghdl-0.4.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ ghdl-0.4.10.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
11
+ ghdl-0.4.10.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -1,26 +0,0 @@
1
- #!/bin/env hy
2
-
3
- "ghdl
4
-
5
- Usage:
6
- ghdl
7
- ghdl (-f <repo> | --force <repo>)
8
- ghdl [-n | --dry-run]
9
- ghdl (-h | --help)
10
- ghdl (-v | --version)
11
-
12
- Options:
13
- -h --help Show this screen.
14
- -v --version Show version.
15
- -n --dry-run Don't download, just show plan.
16
- -f repo --force=repo Force update a single repo.
17
- "
18
-
19
- (import docopt [docopt])
20
- (import ghdl)
21
-
22
- (when (= __name__ "__main__")
23
- (setv args (docopt __doc__ :version ghdl.__version__))
24
- (when (get args "--dry-run") (ghdl.set-dry))
25
- (when (setx repo (get args "--force")) (ghdl.set-single (.lower repo)))
26
- (ghdl.main))
@@ -1,3 +0,0 @@
1
- #!/bin/sh
2
-
3
- sqlite3 ~/.local/share/ghdl/db "DELETE FROM records WHERE repo = '$1' ;" '.exit'
@@ -1,14 +0,0 @@
1
- ghdl/__init__.py,sha256=pCoja9vl_gokkKocZ-gcIkDre9lCZZDuKCtWdmuLvFo,71
2
- ghdl/config.hy,sha256=KeBgBXwoSmkQdDUmjSFcvfdxPdjac40HhDu7DvTfMBg,1568
3
- ghdl/local.hy,sha256=1StKPJ-l3mo6QdtaYfwL9FvZK97MdYIHrRRSF6S06OU,1687
4
- ghdl/main.hy,sha256=4zrM3NrfjRL8Xu-xFGtaxsr2_4rIPPqUG0I3d0Y6TT4,4633
5
- ghdl/remote.hy,sha256=HtKipgn984YtMz8NWf8mHN4aLLj5cb8-AwgFL0JAADs,1570
6
- ghdl/schema.hy,sha256=sXKjpaBVzBAPAx8Ko3RbCJB2GGbE5pilx-E3gVHtFMY,708
7
- ghdl/utils.hy,sha256=DZpjuemTpuyex-2ShLRyNxMzMKPM0jia9CCnqMdizfA,1604
8
- ghdl-0.4.8.data/scripts/ghdl,sha256=KET7_ExHWZlIZZFaLSvdcpU1elvBsB0onEoxDIrDOew,613
9
- ghdl-0.4.8.data/scripts/ghdl-delete-repo,sha256=b2X42MFFmvvJ6ldLAHyrcCkI5LB40Tuefbc3FMAtu54,92
10
- ghdl-0.4.8.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
11
- ghdl-0.4.8.dist-info/METADATA,sha256=qcU5NJhItKsp5lwGS400Aw0AiCtkWyP74zTptou7r9w,40236
12
- ghdl-0.4.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
13
- ghdl-0.4.8.dist-info/top_level.txt,sha256=SQzk56oLwp9nK3FgsTZRR9-tCPZokrFKwA-1TWOPPwQ,5
14
- ghdl-0.4.8.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- ghdl