Skip to content

Commit

Permalink
Merge pull request #16 from robotpy/post2
Browse files Browse the repository at this point in the history
Update beta
  • Loading branch information
virtuald authored Dec 9, 2023
2 parents 78e8545 + 067fbc1 commit e2c4e47
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 49 deletions.
2 changes: 1 addition & 1 deletion apriltag-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
robotpy-apriltag==2024.0.0b3.post1
robotpy-apriltag==2024.0.0b3.post2

# for other platforms there are a lot of ways to install numpy/OpenCV
# and we shouldn't dictate it
Expand Down
2 changes: 1 addition & 1 deletion cscore-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
robotpy-cscore==2024.0.0b3.post1
robotpy-cscore==2024.0.0b3.post2

# basic CameraServer works without NumPy/OpenCV installed, so only require
# them on a RoboRIO -- for other platforms there are a lot of ways to
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2,<8"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "robotpy/version.py"
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

# We now pin allwpilib based packages so that a specific install of robotpy-meta
# is directly associated with a specific set of wpilib packages
robotpy-wpiutil==2024.0.0b3.post1
robotpy-wpimath==2024.0.0b3.post1
pyntcore==2024.0.0b3.post1
robotpy-hal==2024.0.0b3.post1
wpilib==2024.0.0b3.post1
robotpy-wpiutil==2024.0.0b3.post2
robotpy-wpimath==2024.0.0b3.post2
pyntcore==2024.0.0b3.post2
robotpy-hal==2024.0.0b3.post2
wpilib==2024.0.0b3.post2

robotpy-halsim-gui==2024.0.0b3.post1; platform_machine != "roborio" and platform_machine != "armv7l" and platform_machine != "aarch64"
robotpy-halsim-gui==2024.0.0b3.post2; platform_machine != "roborio" and platform_machine != "armv7l" and platform_machine != "aarch64"

# These are not pinned
robotpy-wpilib-utilities<2025,>=2024.0.0b1
Expand Down
40 changes: 1 addition & 39 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,10 @@
#!/usr/bin/env python3

import sys

if sys.version_info < (3, 7):
sys.stderr.write("ERROR: RobotPy requires Python 3.7+\n")
exit(1)

import subprocess
from setuptools import find_packages, setup
from pathlib import Path

setup_dir = Path(__file__).parent
git_dir = setup_dir / ".git"
base_package = "robotpy"
version_file = setup_dir / base_package / "version.py"

# Automatically generate a version.py based on the git version
if git_dir.exists():
p = subprocess.Popen(
["git", "describe", "--tags", "--long", "--dirty=-dirty"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
out, err = p.communicate()
# Make sure the git version has at least one tag
if err:
print("Error: You need to create a tag for this repo to use the builder")
sys.exit(1)

# Convert git version to PEP440 compliant version
# - Older versions of pip choke on local identifiers, so we can't include the git commit
v, commits, local = out.decode("utf-8").rstrip().split("-", 2)
if commits != "0" or "-dirty" in local:
v = "%s.post0.dev%s" % (v, commits)

# Create the version.py file
with open(version_file, "w") as fp:
fp.write("# Autogenerated by setup.py\n__version__ = '{0}'".format(v))

if version_file.exists():
with open(version_file, "r") as fp:
exec(fp.read(), globals())
else:
__version__ = "master"


def get_reqs_from_path(path):
Expand Down Expand Up @@ -72,7 +34,6 @@ def get_reqs_from_path(path):

setup(
name="robotpy",
version=__version__,
description="Meta package to make installing robotpy easier",
long_description=long_description,
author="RobotPy Development Team",
Expand All @@ -98,4 +59,5 @@ def get_reqs_from_path(path):
"Topic :: Software Development",
"Topic :: Software Development :: Testing",
],
use_scm_version=True,
)
4 changes: 2 additions & 2 deletions sim-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
robotpy-halsim-ds-socket==2024.0.0b3.post1; platform_machine != "roborio"
robotpy-halsim-ws==2024.0.0b3.post1; platform_machine != "roborio"
robotpy-halsim-ds-socket==2024.0.0b3.post2; platform_machine != "roborio"
robotpy-halsim-ws==2024.0.0b3.post2; platform_machine != "roborio"

0 comments on commit e2c4e47

Please sign in to comment.