-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api): Make the Makefile have more real prerequisites/targets (#2510)
* fix(api): Make the Makefile have more real prerequisites/targets Instead of using all phony targets, the makefile now pulls the version out of package.json so it can find the name of the wheel that will be built and can use it as a normal Makefile target. Then, we can use that as the prereq for wheel instead of having wheel contain the commands directly, which means that all the stuff that now depends on wheel won’t rerun it every single time it’s called.
- Loading branch information
Showing
2 changed files
with
58 additions
and
19 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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import json | ||
import os | ||
# Pipenv requires setuptools >= 36.2.1. Since 36.2.1, setuptools changed | ||
# the way they vendor dependencies, like the packaging module that | ||
# provides the way to normalize version numbers for wheel file names. So | ||
# we try all the possible ways to find it. | ||
try: | ||
# new way | ||
from setuptools.extern import packaging | ||
except ImportError: | ||
# old way | ||
from pkg_resources.extern import packaging | ||
|
||
pkg_json_path = os.path.join('src', 'opentrons', 'package.json') | ||
old_ver = json.load(open(pkg_json_path))['version'] | ||
vers_obj = packaging.version.Version(old_ver) | ||
|
||
print(str(vers_obj)) |