Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f51f29a
34185: initial version
soehms Jul 15, 2022
3071dbc
34185: correction according to review
soehms Jul 18, 2022
faacd11
Merge branch 'u/soehms/hide_features_34185' of trac.sagemath.org:sage…
soehms Jul 24, 2022
b4b562c
34185: take care of joined features
soehms Jul 25, 2022
ddd7ada
Merge branch 'u/soehms/hide_features_34185' of trac.sagemath.org:sage…
soehms Aug 3, 2022
70abb3f
Merge branch 'u/soehms/hide_features_34185' of trac.sagemath.org:sage…
soehms Aug 4, 2022
442fca6
Merge branch 'join_feature_texfile_with_pdflatex_34282' into hide_fea…
soehms Aug 5, 2022
f39836a
Merge branch 'circular_import_matrix_space_34283' into hide_features_…
soehms Aug 5, 2022
0ec6d46
Merge branch 'u/soehms/hide_features_34185' of trac.sagemath.org:sage…
soehms Aug 7, 2022
f463ac7
Merge branch 'join_feature_texfile_with_pdflatex_34282' into hide_fea…
soehms Aug 9, 2022
ebbd4a4
Merge branch 'circular_import_matrix_space_34283' into hide_features_…
soehms Aug 9, 2022
6912c1c
34185: fix doctest failure + pep8 fixes
soehms Aug 9, 2022
2e11970
Merge branch 'u/soehms/hide_features_34185' of trac.sagemath.org:sage…
soehms Sep 3, 2022
d676f79
Merge branch 'u/soehms/join_feature_texfile_with_pdflatex_34282' of t…
soehms Sep 6, 2022
187bdcf
34185: fix typos
soehms Sep 6, 2022
2a582f4
Merge branch 'u/soehms/hide_features_34185' of trac.sagemath.org:sage…
soehms Sep 30, 2022
f69396c
Merge branch 'u/soehms/hide_features_34185' of https://github.com/sag…
soehms May 22, 2023
b695c04
34185: fix RST issues
soehms May 22, 2023
c3da4d8
34185 / 35668: fixes according to review
soehms May 25, 2023
6dff841
Merge branch 'sagemath:develop' into hide_features_34185
soehms May 25, 2023
72d9da7
Merge branch 'develop' into hide_features_34185
soehms May 30, 2023
7d58d67
Merge branch 'develop' into hide_features_34185
soehms Jun 11, 2023
560228c
Merge branch 'sagemath:develop' into hide_features_34185
soehms Jun 11, 2023
d0ccd37
Merge branch 'hide_features_34185' of github.com:soehms/sage into hid…
soehms Jun 19, 2023
97eaac9
35668: pycodestyle fix
soehms Jun 19, 2023
3103888
Merge branch 'hide_features_34185' into feature_standard_optional_static
mkoeppe Jun 23, 2023
1fcdde3
sage.features: Declare type='standard' explicitly, check against SPKG…
mkoeppe Jun 23, 2023
fd8a32d
Terminology change
mkoeppe Jun 24, 2023
ad202ba
Add 'type=standard' in more places
mkoeppe Jun 24, 2023
62ad2a3
Add 'type=standard' in more places that use pplpy
mkoeppe Jun 25, 2023
98a8664
src/sage/features/cddlib.py: Add type='standard'
mkoeppe Jun 25, 2023
4eddb7c
src/sage/misc/package.py: Do not fail if SAGE_PKGS is not set
mkoeppe Jun 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'u/soehms/join_feature_texfile_with_pdflatex_34282' of t…
…rac.sagemath.org:sage into hide_features_34185
  • Loading branch information
soehms committed Sep 6, 2022
commit d676f794b2c11462d745a6880c6d0f65addf4425
42 changes: 12 additions & 30 deletions src/sage/features/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# ****************************************************************************

from . import StaticFile, Executable, FeatureTestResult, FeatureNotPresentError
from sage.features.join_feature import JoinFeature

latex_url = 'https://www.latex-project.org/'
latex_spkg = 'texlive'
Expand All @@ -37,7 +36,7 @@ def __init__(self, name):
sage: isinstance(latex(), latex)
True
"""
Executable.__init__(self, name, executable=name, spkg=latex_spkg, url=latex_url)
super().__init__(name, executable=name, spkg=latex_spkg, url=latex_url)

def is_functional(self):
r"""
Expand Down Expand Up @@ -97,7 +96,7 @@ def __init__(self):
sage: isinstance(latex(), latex)
True
"""
LaTeX.__init__(self, "latex")
super().__init__("latex")


class pdflatex(LaTeX):
Expand All @@ -118,7 +117,7 @@ def __init__(self):
sage: isinstance(pdflatex(), pdflatex)
True
"""
LaTeX.__init__(self, "pdflatex")
super().__init__("pdflatex")


class xelatex(LaTeX):
Expand All @@ -139,7 +138,7 @@ def __init__(self):
sage: isinstance(xelatex(), xelatex)
True
"""
LaTeX.__init__(self, "xelatex")
super().__init__("xelatex")


class lualatex(LaTeX):
Expand All @@ -160,10 +159,10 @@ def __init__(self):
sage: isinstance(lualatex(), lualatex)
True
"""
LaTeX.__init__(self, "lualatex")
super().__init__("lualatex")


class TeXFile(StaticFile, JoinFeature):
class TeXFile(StaticFile):
r"""
A :class:`sage.features.Feature` describing the presence of a TeX file

Expand All @@ -175,14 +174,14 @@ class TeXFile(StaticFile, JoinFeature):
"""
def __init__(self, name, filename, **kwds):
r"""
EXAMPLES::
Initialize.

TESTS::

sage: from sage.features.latex import LaTeXPackage, pdflatex
sage: LaTeXPackage("tkz-graph")._features
[Feature('pdflatex')]
sage: from sage.features.latex import TeXFile
sage: TeXFile('nonexisting', 'xxxxxx-nonexisting-file.tex').is_present() # optional - latex
FeatureTestResult('nonexisting', False)
"""
JoinFeature.__init__(self, name, [pdflatex()],
spkg=latex_spkg, url=latex_url) # see :trac:`34282`
StaticFile.__init__(self, name, filename, search_path=[], **kwds)

def absolute_filename(self) -> str:
Expand Down Expand Up @@ -220,23 +219,6 @@ def _is_present(self):
"""
return latex().is_present() and super()._is_present()

def _is_present(self):
r"""
Test for the presence of the TeX-file.

EXAMPLES::

sage: from sage.features.latex import LaTeXPackage, pdflatex
sage: f = LaTeXPackage("tkz-graph")
sage: g = pdflatex()
sage: bool(f.is_present()) == bool(g.is_present()) # indirect doctest
True
"""
test = JoinFeature._is_present(self)
if not test:
return test
return super(TeXFile, self)._is_present()


class LaTeXPackage(TeXFile):
r"""
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.