def _do_clean (self, cao, packages) : for pn, pp in packages : with sos.changed_dir (pp) : if cao.verbose : print ("Cleaning", pn) to_clean = \ ( [".eggs", "build", "dist"] + sos.expanded_glob ("*.egg-info") ) if to_clean : TFL_STP.run_command (["rm", "-rf"] + to_clean)
def _do_clean(self, cao, packages): for pn, pp in packages: with sos.changed_dir(pp): if cao.verbose: print("Cleaning", pn) to_clean = \ ( [".eggs", "build", "dist"] + sos.expanded_glob ("*.egg-info") ) if to_clean: TFL_STP.run_command(["rm", "-rf"] + to_clean)
def _handle_version (self, cao) : packages = self._packages (cao) if packages : for pn, pp in packages : with sos.changed_dir (pp) : if cao.update : v = TFL_STP.update_version_py () else : v = self._git_version () or "unknown" print ("%-8s : %s" % (pn, v)) else : v = self._git_version () or "unknown" print ("Repository tag: %s" % (v, ))
def _handle_version(self, cao): packages = self._packages(cao) if packages: for pn, pp in packages: with sos.changed_dir(pp): if cao.update: v = TFL_STP.update_version_py() else: v = self._git_version() or "unknown" print("%-8s : %s" % (pn, v)) else: v = self._git_version() or "unknown" print("Repository tag: %s" % (v, ))
def _do_tag (self, cao, new_tag, msg) : if new_tag.startswith ("+") : new = self._tag_incremented (new_tag) else : new = new_tag cmd = ["git", "tag", new] if msg : cmd += ["-m", msg] if cao.dry_run : print (* cmd) else : try : out = TFL_STP.run_command (cmd) except subprocess.CalledProcessError as exc : print ("Error from tag", new, "\n ", exc.output) raise SystemExit (126) if cao.verbose : print (out) return new
def _do_tag(self, cao, new_tag, msg): if new_tag.startswith("+"): new = self._tag_incremented(new_tag) else: new = new_tag cmd = ["git", "tag", new] if msg: cmd += ["-m", msg] if cao.dry_run: print(*cmd) else: try: out = TFL_STP.run_command(cmd) except subprocess.CalledProcessError as exc: print("Error from tag", new, "\n ", exc.output) raise SystemExit(126) if cao.verbose: print(out) return new
def _git_version (self, abort_on_error = False) : d_v = TFL_STP.git_date_version (abort_on_error = abort_on_error) if d_v : result = d_v [1] return result
# Setup file for package namespace ReST # # Revision Dates # 12-Oct-2016 (CT) Creation # 13-Oct-2016 (CT) Use `find_packages`, `_TFL.fs_find`, not home-grown code # 22-Feb-2017 (CT) Use `TFL_STP`, not home-grown code # 27-Feb-2017 (CT) Add Python 3.6 to `classifiers` # 25-Mar-2020 (CT) Restrict Python versions to >=3.7 # ««revision-date»»··· #-- from setuptools import setup import TFL_STP as STP STP.change_to_dir(__file__) license = "BSD License" name = "ReST-Tapyr" p_name = "_ReST" version = STP.package_version() long_description = STP.long_description() packages, data_files = STP.packages_plus_data_files(p_name) Test_Command = STP.Test_Command if __name__ == "__main__": setup \ ( name = name , version = version , description =
# # Revision Dates # 11-Oct-2016 (CT) Creation # 13-Oct-2016 (CT) Use `find_packages`, `_TFL.fs_find`, not home-grown code # 22-Feb-2017 (CT) Use `TFL_STP`, not home-grown code # 27-Feb-2017 (CT) Add Python 3.6 to `classifiers` # ««revision-date»»··· #-- from __future__ import print_function from setuptools import setup import TFL_STP as STP STP.change_to_dir (__file__) license = "BSD License" name = "ATAX" p_name = "_ATAX" version = STP.package_version () long_description = STP.long_description () packages, data_files = STP.packages_plus_data_files (p_name) Test_Command = STP.Test_Command if __name__ == "__main__" : setup \ ( name = name , version = version , description =
# Revision Dates # 12-Oct-2016 (CT) Creation # 13-Oct-2016 (CT) Use `find_packages`, `_TFL.fs_find`, not home-grown code # 22-Feb-2017 (CT) Use `TFL_STP`, not home-grown code # 25-Feb-2017 (CT) Pass `data_dirs` to `packages_plus_data_files` # 27-Feb-2017 (CT) Add Python 3.6 to `classifiers` # ««revision-date»»··· #-- from __future__ import print_function from setuptools import setup import TFL_STP as STP STP.change_to_dir(__file__) license = "BSD License" name = "JNJ" p_name = "_JNJ" version = STP.package_version() long_description = STP.long_description() packages, data_files = STP.packages_plus_data_files \ (p_name, data_dirs = ["email", "html", "httpd_config"]) Test_Command = STP.Test_Command if __name__ == "__main__": setup \ ( name = name , version = version
def _git_version(self, abort_on_error=False): d_v = TFL_STP.git_date_version(abort_on_error=abort_on_error) if d_v: result = d_v[1] return result