From 3a5196e68b6e5d75a82523ee625fa1ca48b41113 Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Thu, 8 Apr 2021 07:26:14 -0400 Subject: [PATCH 1/5] Add typing markers. --- setup.cfg | 4 ++++ sprockets_statsd/py.typed | 0 2 files changed, 4 insertions(+) create mode 100644 sprockets_statsd/py.typed diff --git a/setup.cfg b/setup.cfg index b90bd16..51139c2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,6 +51,10 @@ readthedocs = exclude = tests +[options.package_data] +sprockets_statsd = + py.typed + [build_sphinx] build_dir = build/sphinx nitpicky = 1 diff --git a/sprockets_statsd/py.typed b/sprockets_statsd/py.typed new file mode 100644 index 0000000..e69de29 From 2fb3646f0d3ce1a19c617d4bc25e284227af307b Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Thu, 8 Apr 2021 07:56:40 -0400 Subject: [PATCH 2/5] Changes recommended by twine and pypi. Interestingly enough twine check does not seem to check classifiers for correctness ... testpypi rejected my first upload :( --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 51139c2..72d8d51 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ name = sprockets-statsd version = attr: sprockets_statsd.version description = Asynchronously send metrics to a statsd instance. long_description = file: README.rst +long_description_content_type = text/x-rst license = BSD 3-Clause License url = https://sprockets-statsd.readthedocs.io/ project_urls: @@ -13,7 +14,7 @@ author = Dave Shawley author_email = daveshawley@gmail.com classifiers = Development Status :: 1 - Planning - Indended Audience :: Developers + Intended Audience :: Developers License :: OSI Approved :: BSD License Natural Language :: English Operating System :: OS Independent From f51870b2f910dfc36b50d41eb15d08afeb88fa0a Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Thu, 8 Apr 2021 07:57:38 -0400 Subject: [PATCH 3/5] Add minimal pyproject.toml. cuz Tim Peters said so --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b0f0765 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42"] +build-backend = "setuptools.build_meta" From ea8d2363fe3dd3ff6ad0d0cb26e3dd1760563452 Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Thu, 8 Apr 2021 08:11:36 -0400 Subject: [PATCH 4/5] Add build.yml Roughly based on what @gmr did in sprockets-postgres... still not sure if the explicit `if` guard is necessary. --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e9359cb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Distribution +on: + push: + branches-ignore: ["*"] + tags: ["*"] + +jobs: + upload-package: + name: "Build & upload package" + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.repository == 'sprockets/sprockets-statsd' + steps: + - uses: actions/checkout@v2 + - name: Install python + uses: actions/setup-python@v2 + with: + python-version: 3.7 # use 3.7 for wheel compatibility + - name: Install builder + run: | + python -m pip install --upgrade build pip setuptools twine + - name: Build distributions + run: | + python -m build --sdist --wheel --outdir dist/ . + - name: Upload packages + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{ secrets.PYPI_PASSWORD }} + skip_existing: true # just in case... From 6835e0fd2d51fdff7c50e23e75ea01aab7c3ed42 Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Thu, 8 Apr 2021 08:12:48 -0400 Subject: [PATCH 5/5] 0.0.1: Trying out the release pipeline! --- sprockets_statsd/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sprockets_statsd/__init__.py b/sprockets_statsd/__init__.py index d6bcd66..e569d99 100644 --- a/sprockets_statsd/__init__.py +++ b/sprockets_statsd/__init__.py @@ -1,2 +1,2 @@ -version_info = (0, 0, 0) +version_info = (0, 0, 1) version = '.'.join(str(c) for c in version_info)