Skip to content

Commit

Permalink
Merge pull request #583 from tacaswell/bld/fix_sdist
Browse files Browse the repository at this point in the history
BLD: fix sdist build and upload
  • Loading branch information
danielballan committed Jul 26, 2023
2 parents 1a80914 + 8f6010f commit 8a9ea39
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
pip install .
pip install wheel setuptools
python setup.py sdist bdist_wheel
python setup.py sdist
- name: Publish wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
20 changes: 16 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
#!/usr/bin/env python
"""
isort:skip_file
"""


import os
import sys
from os import path

import numpy as np
from Cython.Build import cythonize

from setuptools import Extension, find_packages, setup
from Cython.Build import cythonize

import versioneer

# read the contents of your README file
from pathlib import Path

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()


def c_ext():
if os.name == "nt":
Expand All @@ -33,17 +43,19 @@ def cython_ext():
return cythonize("skbeam/**/*.pyx", compiler_directives={"language_level": "3"})


here = path.abspath(path.dirname(__file__))
with open(path.join(here, "requirements.txt")) as requirements_file:
with open(this_directory / "requirements.txt") as requirements_file:
# Parse requirements.txt, ignoring any commented-out lines.
requirements = [line for line in requirements_file.read().splitlines() if not line.startswith("#")]


setup(
name="scikit-beam",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author="Brookhaven National Lab",
description="Data analysis tools for X-ray science",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(exclude=["doc"]),
include_dirs=[np.get_include()],
package_data={"skbeam.core.constants": ["data/*.dat"]},
Expand Down

0 comments on commit 8a9ea39

Please sign in to comment.