File tree Expand file tree Collapse file tree 9 files changed +1456
-13
lines changed
Expand file tree Collapse file tree 9 files changed +1456
-13
lines changed Original file line number Diff line number Diff line change 11# Changes here will be overwritten by Copier
22_commit : 7e5612d
33_src_path : https://github.com/python-project-templates/base.git
4- add_docs : false
4+ add_docs : true
55add_extension : python
66add_wiki : false
77email : t.paine154@gmail.com
Original file line number Diff line number Diff line change 1+ name : Docs
2+ on :
3+ push :
4+ branches : ["main"]
5+ tags : ["v*"]
6+ workflow_dispatch :
7+ permissions :
8+ contents : write
9+ jobs :
10+ docs :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions-ext/yardang@main
14+ with :
15+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ format: fix
4646# ###############
4747# Other Checks #
4848# ###############
49- .PHONY : check-manifest checks check
49+ .PHONY : check-dist checks check
5050
51- check-manifest : # # check python sdist manifest with check-manifest
52- check-manifest -v
51+ check-dist : # # check python sdist with check-dist
52+ check-dist -v
5353
54- checks : check-manifest
54+ checks : check-dist
5555
5656# Alias
5757check : checks
Original file line number Diff line number Diff line change 11__version__ = "0.1.0"
2+
3+ from ._core import ( # noqa: F401
4+ CheckDistError ,
5+ check_absent ,
6+ check_dist ,
7+ check_present ,
8+ check_sdist_vs_vcs ,
9+ check_wrong_platform_extensions ,
10+ find_dist_files ,
11+ get_vcs_files ,
12+ list_sdist_files ,
13+ list_wheel_files ,
14+ load_config ,
15+ load_hatch_config ,
16+ matches_pattern ,
17+ translate_extension ,
18+ )
Original file line number Diff line number Diff line change 1+ """CLI entry point for check-dist."""
2+
3+ from __future__ import annotations
4+
5+ import argparse
6+ import sys
7+
8+ from ._core import CheckDistError , check_dist
9+
10+
11+ def main (argv : list [str ] | None = None ) -> None :
12+ parser = argparse .ArgumentParser (
13+ prog = "check-dist" ,
14+ description = "Check Python source and wheel distributions for correctness" ,
15+ )
16+ parser .add_argument (
17+ "source_dir" ,
18+ nargs = "?" ,
19+ default = "." ,
20+ help = "Source directory (default: current directory)" ,
21+ )
22+ parser .add_argument (
23+ "--no-isolation" ,
24+ action = "store_true" ,
25+ help = "Disable build isolation" ,
26+ )
27+ parser .add_argument (
28+ "-v" ,
29+ "--verbose" ,
30+ action = "store_true" ,
31+ help = "List every file inside each distribution" ,
32+ )
33+ parser .add_argument (
34+ "--pre-built" ,
35+ metavar = "DIR" ,
36+ default = None ,
37+ help = "Skip building and use existing dist files from DIR" ,
38+ )
39+ args = parser .parse_args (argv )
40+
41+ try :
42+ success , messages = check_dist (
43+ source_dir = args .source_dir ,
44+ no_isolation = args .no_isolation ,
45+ verbose = args .verbose ,
46+ pre_built = args .pre_built ,
47+ )
48+ for msg in messages :
49+ print (msg )
50+ sys .exit (0 if success else 1 )
51+ except CheckDistError as exc :
52+ print (f"Error: { exc } " , file = sys .stderr )
53+ sys .exit (2 )
54+
55+
56+ if __name__ == "__main__" :
57+ main ()
You can’t perform that action at this time.
0 commit comments