-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting up shop with SetupShop #200
Changes from 7 commits
07d6078
6b15fe6
89ca484
9637a92
4ded992
758ff2d
cee77d3
0f32ae4
981d637
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Try Setup Install | ||
|
||
on: [push] | ||
|
||
jobs: | ||
|
||
gather-py3-versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.py3_versions.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Python Versions | ||
id: py3_versions | ||
run: | | ||
minmin_maxmax=$(grep -P "\(\(\d+, ?\d+\), ?\(\d+, ?\d+\)\)" -oh setup.py | sed 's/[^0-9]/ /g') | ||
IFS=', ' read -r -a array <<< "$minmin_maxmax" | ||
min_thru_max_series=$(for i in `seq ${array[1]} ${array[3]}`; do printf "3.$i,"; done | rev | cut -c 2- | rev) | ||
echo ::set-output name=matrix::{\"py3_versions\":[$(echo $min_thru_max_series)]}\" | ||
|
||
setup-py-install: | ||
needs: gather-py3-versions | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
max-parallel: 4 | ||
fail-fast: false | ||
matrix: ${{ fromJSON(needs.gather-py3-versions.outputs.matrix) }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.py3_versions }} | ||
- run: | | ||
echo ${{ matrix.py3_versions }} | ||
python setup.py install | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
binpacking==1.4.3 | ||
binpacking==1.4.5 | ||
colorama==0.4.4 | ||
flake8==3.9.1 | ||
flake8==3.9.2 | ||
hurry.filesize==0.9 | ||
motor==2.4.0 | ||
mypy==0.812 | ||
numpy==1.20.3 | ||
prometheus-client==0.10.1 | ||
pymongo==3.11.3 | ||
pytest==6.2.3 | ||
pycycle==0.0.8 | ||
pymongo==3.11.4 | ||
pytest==6.2.4 | ||
pytest-asyncio==0.15.1 | ||
pytest-cov==2.11.1 | ||
pytest-mock==3.5.1 | ||
pytest-cov==2.12.0 | ||
pytest-mock==3.6.1 | ||
requests==2.25.1 | ||
-e git+https://github.com/WIPACrepo/rest-tools@v1.0.7#egg=rest_tools | ||
git+https://github.com/WIPACrepo/rest-tools@v1.0.7#egg=rest_tools | ||
tornado==6.1 | ||
git+https://github.com/WIPACrepo/wipac-dev-tools@v1.0.7#egg=wipac_dev_tools |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,39 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
import sys | ||
import glob | ||
import os | ||
from setuptools import setup # type: ignore[import] | ||
import subprocess | ||
|
||
if sys.version_info < (3, 6): | ||
print('ERROR: LTA requires at least Python 3.6+ to run.') | ||
sys.exit(1) | ||
|
||
try: | ||
# Use setuptools if available, for install_requires (among other things). | ||
import setuptools # type: ignore | ||
setup = setuptools.setup | ||
except ImportError: | ||
setuptools = None | ||
from distutils.core import setup | ||
|
||
kwargs = {} | ||
|
||
current_path = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
with open(os.path.join(current_path, 'lta', '__init__.py')) as f: | ||
for line in f.readlines(): | ||
if '__version__' in line: | ||
kwargs['version'] = line.replace('"', "'").split('=')[-1].split("'")[1] | ||
break | ||
else: | ||
raise Exception('cannot find __version__') | ||
|
||
with open(os.path.join(current_path, 'README.md')) as f: | ||
kwargs['long_description'] = f.read() | ||
subprocess.run( | ||
"pip install --upgrade pip".split(), | ||
check=True, | ||
) | ||
subprocess.run( | ||
"pip install git+https://github.com/WIPACrepo/wipac-dev-tools.git".split(), | ||
check=True, | ||
) | ||
from wipac_dev_tools import SetupShop # noqa: E402 # pylint: disable=C0413 | ||
|
||
if setuptools is not None: | ||
# If setuptools is not available, you're on your own for dependencies. | ||
install_requires = [ | ||
'coverage>=4.4.2', | ||
'PyJWT', | ||
'pymongo', | ||
'requests', | ||
'requests_toolbelt', | ||
'requests-futures', | ||
'sphinx>=1.4', | ||
'tornado>=5.1' | ||
] | ||
kwargs['install_requires'] = install_requires # type: ignore | ||
kwargs['zip_safe'] = False # type: ignore | ||
shop = SetupShop( | ||
"lta", | ||
os.path.abspath(os.path.dirname(__file__)), | ||
((3, 6), (3, 10)), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure how the GH Action will act with grabbing 3.10. But I see there's an issue There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. running the bash lines locally, I get There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. relevant: actions/setup-python#177 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh I found the issue... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"LTA is the Long Term Archive service and related tools, developed for the IceCube Collaboration.", | ||
) | ||
|
||
setup( | ||
name='lta', | ||
scripts=glob.glob('bin/*'), | ||
packages=['lta'], | ||
package_data={ | ||
# data files need to be listed both here (which determines what gets | ||
# installed) and in MANIFEST.in (which determines what gets included | ||
# in the sdist tarball) | ||
# 'iceprod.server':['data/etc/*','data/www/*','data/www_templates/*'], | ||
}, | ||
author="IceCube Collaboration", | ||
author_email="developers@icecube.wisc.edu", | ||
scripts=glob.glob("bin/*"), | ||
url="https://github.com/WIPACrepo/lta", | ||
license="https://github.com/WIPACrepo/lta/blob/master/LICENSE", | ||
description="LTA is the Long Term Archive service and related tools, developed for the IceCube Collaboration.", | ||
classifiers=[ | ||
# How mature is this project? Common values are | ||
# 3 - Alpha | ||
# 4 - Beta | ||
# 5 - Production/Stable | ||
'Development Status :: 3 - Alpha', | ||
|
||
'Operating System :: POSIX :: Linux', | ||
'Topic :: System :: Distributed Computing', | ||
|
||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
], | ||
**kwargs | ||
# package_data={shop.name: ["py.typed"]}, | ||
**shop.get_kwargs( | ||
subpackages=["transfer"], | ||
other_classifiers=[ | ||
"Operating System :: POSIX :: Linux", | ||
"Topic :: System :: Distributed Computing", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
], | ||
), | ||
zip_safe=False, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's up with the diff here, but it's a copy of https://github.com/WIPACrepo/rest-tools/blob/master/.github/workflows/try-setup-install.yml