forked from robotpy/pyfrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
53 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
try: | ||
from .version import __version__ | ||
from .version import version as __version__ | ||
except ImportError: | ||
__version__ = "master" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,53 @@ | ||
[metadata] | ||
name = pyfrc | ||
description = Development tools library for python interpreter used for the FIRST Robotics Competition | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
author = Dustin Spicuzza | ||
author_email = [email protected] | ||
url = https://github.com/robotpy/pyfrc | ||
license = BSD-3-Clause | ||
# Include the license file in wheels. | ||
license_file = LICENSE | ||
|
||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: BSD License | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Topic :: Software Development | ||
Topic :: Software Development :: Testing | ||
|
||
[options] | ||
zip_safe = False | ||
include_package_data = True | ||
packages = find: | ||
install_requires = | ||
setuptools_scm == 5.0.* | ||
pytest>=3.9 | ||
pynetconsole>=2.0.2 | ||
pint>=0.11.0 | ||
|
||
robotpy-wpiutil>=2021,<2022 | ||
pyntcore>=2021,<2022 | ||
robotpy-hal>=2021,<2022 | ||
wpilib>=2021,<2022 | ||
|
||
robotpy-installer>=2021,<2022 | ||
setup_requires = | ||
setuptools_scm == 5.0.* | ||
python_requires = >=3.6 | ||
|
||
[options.entry_points] | ||
robotpy = | ||
add-tests = pyfrc.mains.cli_add_tests:PyFrcAddTests | ||
coverage = pyfrc.mains.cli_coverage:PyFrcCoverage | ||
create-physics = pyfrc.mains.cli_create_physics:PyFrcCreatePhysics | ||
deploy = pyfrc.mains.cli_deploy:PyFrcDeploy | ||
profiler = pyfrc.mains.cli_profiler:PyFrcProfiler | ||
sim = pyfrc.mains.cli_sim:PyFrcSim | ||
test = pyfrc.mains.cli_test:PyFrcTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,5 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
from setuptools import setup | ||
|
||
if sys.version_info < (3, 6): | ||
sys.stderr.write("ERROR: RobotPy requires Python 3.6+\n") | ||
exit(1) | ||
|
||
import os | ||
from os.path import dirname, exists, join | ||
import subprocess | ||
from setuptools import find_packages, setup | ||
import glob | ||
|
||
setup_dir = dirname(__file__) | ||
git_dir = join(setup_dir, ".git") | ||
base_package = "pyfrc" | ||
version_file = join(setup_dir, base_package, "version.py") | ||
|
||
# Automatically generate a version.py based on the git version | ||
if exists(git_dir): | ||
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 exists(version_file): | ||
with open(version_file, "r") as fp: | ||
exec(fp.read(), globals()) | ||
else: | ||
__version__ = "master" | ||
|
||
with open(join(setup_dir, "requirements.txt")) as requirements_file: | ||
install_requires = requirements_file.readlines() | ||
|
||
with open(join(dirname(__file__), "README.md"), "r") as readme_file: | ||
long_description = readme_file.read() | ||
|
||
setup( | ||
name="pyfrc", | ||
version=__version__, | ||
description="Development tools library for python interpreter used for the FIRST Robotics Competition", | ||
long_description=long_description, | ||
author="Dustin Spicuzza, Sam Rosenblum", | ||
author_email="[email protected]", | ||
url="https://github.com/robotpy/pyfrc", | ||
license="BSD-3-Clause", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
install_requires=install_requires | ||
if not os.environ.get("ROBOTPY_NO_DEPS") | ||
else None, | ||
extras_require={"coverage": ["coverage"]}, | ||
requires_python=">=3.6", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Framework :: Pytest", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Education", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Software Development", | ||
"Topic :: Software Development :: Testing", | ||
], | ||
entry_points={ | ||
"robotpy": [ | ||
"add-tests = pyfrc.mains.cli_add_tests:PyFrcAddTests", | ||
"coverage = pyfrc.mains.cli_coverage:PyFrcCoverage", | ||
"create-physics = pyfrc.mains.cli_create_physics:PyFrcCreatePhysics", | ||
"deploy = pyfrc.mains.cli_deploy:PyFrcDeploy", | ||
"profiler = pyfrc.mains.cli_profiler:PyFrcProfiler", | ||
"sim = pyfrc.mains.cli_sim:PyFrcSim", | ||
"test = pyfrc.mains.cli_test:PyFrcTest", | ||
] | ||
}, | ||
) | ||
setup(use_scm_version={"write_to": "pyfrc/version.py"}) |