diff --git a/.gitignore b/.gitignore index 6509faf..152cd14 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ dist # Testing .tox .pytest_cache + +.pybuild/ diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..e11385f --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,6 @@ +*.substvars +*debhelper* +.debhelper +files +python3-shellingham +tmp diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..a97f68a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-shellingham (100:1.5.0-1) UNRELEASED; urgency=medium + + * https://github.com/sarugaku/shellingham/releases/tag/1.5.0 + + -- Wong Hoi Sing Edison Thu, 04 Aug 2022 11:00:09 +0800 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..0e7a36c --- /dev/null +++ b/debian/control @@ -0,0 +1,26 @@ +Source: python-shellingham +Section: python +Priority: optional +Standards-Version: 4.5.0 +Maintainer: Wong Hoi Sing Edison +Homepage: https://github.com/sarugaku/shellingham/tags +Vcs-Browser: https://github.com/alvistack/sarugaku-shellingham +Vcs-Git: https://github.com/alvistack/sarugaku-shellingham.git +Build-Depends: + debhelper, + debhelper-compat (= 10), + dh-python, + fdupes, + python3-dev, + python3-setuptools, + +Package: python3-shellingham +Architecture: all +Description: Tool to detect surrounding Shell + Shellingham detects what shell the current Python executable is running + in. +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ${python3:Depends}, + python3, diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..e69de29 diff --git a/debian/python3-shellingham.install b/debian/python3-shellingham.install new file mode 100644 index 0000000..e3da3e7 --- /dev/null +++ b/debian/python3-shellingham.install @@ -0,0 +1 @@ +usr/lib/python*/*-packages/* diff --git a/debian/python3-shellingham.lintian-overrides b/debian/python3-shellingham.lintian-overrides new file mode 100644 index 0000000..2ba0b69 --- /dev/null +++ b/debian/python3-shellingham.lintian-overrides @@ -0,0 +1,4 @@ +python3-shellingham: copyright-without-copyright-notice +python3-shellingham: initial-upload-closes-no-bugs +python3-shellingham: no-manual-page +python3-shellingham: zero-byte-file-in-doc-directory diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..fcaa45e --- /dev/null +++ b/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +SHELL := /bin/bash + +override_dh_auto_install: + dh_auto_install --destdir=debian/tmp + find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \; + fdupes -qnrps debian/tmp/usr/lib/python*/*-packages + +override_dh_auto_test: + +override_dh_auto_clean: + +%: + dh $@ --buildsystem=pybuild --with python3 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..a9bc22c --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,3 @@ +python-shellingham source: no-debian-changes +python-shellingham source: source-contains-prebuilt-windows-binary +python-shellingham source: source-package-encodes-python-version diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index f195ab1..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,34 +0,0 @@ -[build-system] -requires = ["setuptools", "wheel"] - -[tool.black] -line-length = 79 - -[tool.towncrier] -package = "shellingham" -package_dir = "src" -filename = "CHANGELOG.rst" -directory = "news/" -title_format = "{version} ({project_date})" -issue_format = "`#{issue} `_" -template = "tasks/CHANGELOG.rst.jinja2" - -[[tool.towncrier.type]] -directory = "feature" -name = "Features" -showcontent = true - -[[tool.towncrier.type]] -directory = "bugfix" -name = "Bug Fixes" -showcontent = true - -[[tool.towncrier.type]] -directory = "trivial" -name = "Trivial Changes" -showcontent = false - -[[tool.towncrier.type]] -directory = "removal" -name = "Removals and Deprecations" -showcontent = true diff --git a/python-shellingham.spec b/python-shellingham.spec new file mode 100644 index 0000000..4b88b57 --- /dev/null +++ b/python-shellingham.spec @@ -0,0 +1,75 @@ +%global debug_package %{nil} + +Name: python-shellingham +Epoch: 100 +Version: 1.5.0 +Release: 1%{?dist} +BuildArch: noarch +Summary: Tool to detect surrounding Shell +License: ISC +URL: https://github.com/sarugaku/shellingham/tags +Source0: %{name}_%{version}.orig.tar.gz +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description +Shellingham detects what shell the current Python executable is running +in. + +%prep +%autosetup -T -c -n %{name}_%{version}-%{release} +tar -zx -f %{S:0} --strip-components=1 -C . + +%build +%py3_build + +%install +%py3_install +find %{buildroot}%{python3_sitelib} -type f -name '*.pyc' -exec rm -rf {} \; +fdupes -qnrps %{buildroot}%{python3_sitelib} + +%check + +%if 0%{?suse_version} > 1500 +%package -n python%{python3_version_nodots}-shellingham +Summary: Tool to detect surrounding Shell +Requires: python3 +Provides: python3-shellingham = %{epoch}:%{version}-%{release} +Provides: python3dist(shellingham) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-shellingham = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(shellingham) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-shellingham = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(shellingham) = %{epoch}:%{version}-%{release} + +%description -n python%{python3_version_nodots}-shellingham +Shellingham detects what shell the current Python executable is running +in. + +%files -n python%{python3_version_nodots}-shellingham +%license LICENSE +%{python3_sitelib}/* +%endif + +%if !(0%{?suse_version} > 1500) +%package -n python3-shellingham +Summary: Tool to detect surrounding Shell +Requires: python3 +Provides: python3-shellingham = %{epoch}:%{version}-%{release} +Provides: python3dist(shellingham) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-shellingham = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(shellingham) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-shellingham = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(shellingham) = %{epoch}:%{version}-%{release} + +%description -n python3-shellingham +Shellingham detects what shell the current Python executable is running +in. + +%files -n python3-shellingham +%license LICENSE +%{python3_sitelib}/* +%endif + +%changelog diff --git a/setup.cfg b/setup.cfg index 37d4a4a..96aa777 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,27 +8,27 @@ author_email = uranusjr@gmail.com long_description = file: README.rst long_description_content_type = text/x-rst license = ISC License -keywords = - shell -classifier = - Development Status :: 3 - Alpha - Environment :: Console - Intended Audience :: Developers - License :: OSI Approved :: ISC License (ISCL) - Operating System :: OS Independent - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Topic :: Software Development :: Libraries :: Python Modules +keywords = + shell +classifier = + Development Status :: 3 - Alpha + Environment :: Console + Intended Audience :: Developers + License :: OSI Approved :: ISC License (ISCL) + Operating System :: OS Independent + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Topic :: Software Development :: Libraries :: Python Modules [options] -package_dir = - = src +package_dir = + = src packages = find: -python_requires = >=3.4 -install_requires = +python_requires = >=3.7 +install_requires = zip_safe = true [options.packages.find] @@ -36,3 +36,8 @@ where = src [bdist_wheel] universal = 1 + +[egg_info] +tag_build = +tag_date = 0 +