Skip to content

Commit

Permalink
Added sphinx-math-dollar as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus committed Dec 19, 2021
1 parent dc57880 commit 194c0f5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
21 changes: 12 additions & 9 deletions installers/Windows/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ def pypi_wheels_in(requirements, skip_packages):
def package_name(requirement):
"""
Return the name component of a `name==version` formatted requirement.
Also, replace - with _ as - is not allowed in module names.
"""
requirement_name = requirement.partition("==")[0].split("@")[0].strip()
return requirement_name
name = requirement.partition("==")[0].split("@")[0].strip().replace("-", "_")
return name


def packages_from(requirements, wheels, skip_packages):
Expand All @@ -223,9 +225,11 @@ def packages_from(requirements, wheels, skip_packages):
Both assumed to be lists/iterables of strings formatted like
"name==version".
"""
packages = set(requirements) - set(wheels) - set(skip_packages)
packages = packages | set(ADD_PACKAGES)
return [package_name(p) for p in packages]
packages = (set(package_name(p) for p in requirements) -
set(package_name(p) for p in wheels) -
set(package_name(p) for p in skip_packages))
packages = packages | set(package_name(p) for p in ADD_PACKAGES)
return list(packages)


def create_pynsist_cfg(
Expand Down Expand Up @@ -257,10 +261,9 @@ def create_pynsist_cfg(
package_name(line) not in UNWANTED_PACKAGES and \
'-e git' not in line
]
skip_wheels = [package] + SKIP_PACKAGES
wheels = pypi_wheels_in(requirements, skip_wheels)
skip_packages = [package]
packages = packages_from(requirements, wheels, skip_packages)
skip = [package] + SKIP_PACKAGES
wheels = pypi_wheels_in(requirements, skip)
packages = packages_from(requirements, wheels, skip)

if suffix:
installer_name = "{}_{}bit_{}.exe"
Expand Down
1 change: 1 addition & 0 deletions installers/Windows/req-extras-pull-request.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pydocstyle
pyflakes
pyxdg
rope
sphinx-math-dollar
yapf

# Scientific packages (for Same as Spyder)
Expand Down
1 change: 1 addition & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ qtpy >=1.5.0
rtree >=0.9.7
setuptools >=49.6.0
sphinx >=0.6.6
sphinx-math-dollar >=1.2
spyder-kernels >=2.2.0,<2.3.0
textdistance >=4.2.0
three-merge >=0.1.1
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def run(self):
'rtree>=0.9.7',
'setuptools>=49.6.0',
'sphinx>=0.6.6',
'sphinx-math-dollar>=1.2',
'spyder-kernels>=2.2.0,<2.3.0',
'textdistance>=4.2.0',
'three-merge>=0.1.1',
Expand Down
5 changes: 5 additions & 0 deletions spyder/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
RTREE_REQVER = '>=0.9.7'
SETUPTOOLS_REQVER = '>=49.6.0'
SPHINX_REQVER = '>=0.6.6'
SPHINX_MATH_DOLLAR_REQVER = '>=1.2'
SPYDER_KERNELS_REQVER = '>=2.2.0;<2.3.0'
TEXTDISTANCE_REQVER = '>=4.2.0'
THREE_MERGE_REQVER = '>=0.1.1'
Expand Down Expand Up @@ -233,6 +234,10 @@
'package_name': "sphinx",
'features': _("Show help for objects in the Editor and Consoles in a dedicated pane"),
'required_version': SPHINX_REQVER},
{'modname': "sphinx_math_dollar",
'package_name': "sphinx-math-dollar",
'features': _("Format math in help text using dollar sign"),
'required_version': SPHINX_MATH_DOLLAR_REQVER},
{'modname': "spyder_kernels",
'package_name': "spyder-kernels",
'features': _("Jupyter kernels for the Spyder console"),
Expand Down

0 comments on commit 194c0f5

Please sign in to comment.