Skip to content

Commit

Permalink
package data fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusRainerSchmidt committed Jun 16, 2023
1 parent 070ba05 commit 592bc7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}


test:
needs: [publish-pypi]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: ./dist

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
from setuptools import find_packages
import subprocess
import sys

VERSION = "0.3.3"

Expand Down Expand Up @@ -47,6 +46,14 @@ def run_command(cmd):
# update version file...
conf_version("VERSION.in", VERSION, "biosmoother/VERSION")

def package_files(directory):
paths = []
for (path, _, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join('..', path, filename))
return paths
extra_files = package_files('biosmoother')
print(extra_files)

setup(
name="biosmoother",
Expand All @@ -61,6 +68,7 @@ def run_command(cmd):
""",
py_modules=["cli"],
packages=find_packages(where='.'),
package_data={'biosmoother': extra_files},
include_package_data=True,
data_files=[("biosmoother", ["biosmoother/VERSION"])],
extras_require={"test": "pytest"},
Expand Down

0 comments on commit 592bc7d

Please sign in to comment.