Skip to content

Commit

Permalink
update [pypi]
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Jun 6, 2024
1 parent d3e2e2b commit db70d1f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion camb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
__author__ = "Antony Lewis"
__contact__ = "antony at cosmologist dot info"
__url__ = "https://camb.readthedocs.io"
__version__ = "1.5.4"
__version__ = "1.5.4.dev.1"

from . import baseconfig

Expand Down
2 changes: 1 addition & 1 deletion fortran/config.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module config
use constants, only: const_twopi
implicit none

character(LEN=*), parameter :: version = '1.5.4'
character(LEN=*), parameter :: version = '1.5.4.dev.1'

integer :: FeedbackLevel = 0 !if >0 print out useful information about the model

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@ Source = "https://github.com/cmbant/camb"
Tracker = "https://github.com/cmbant/camb/issues"
Licensing = "https://github.com/cmbant/camb/blob/master/LICENCE.txt"

[tool.project.metadata]
name = "camb"
version = { python = 'import setup; setup.find_version()' }
[tool.setuptools.dynamic]
version = {attr = "camb.__version__"}
13 changes: 0 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,21 +274,8 @@ def run(self):
pass


def find_version():
version_file = open(os.path.join(file_dir, 'camb', '__init__.py')).read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
version = version_match.group(1)
commit = os.getenv('GITHUB_RUN_NUMBER')
if commit and not os.getenv('GITHUB_REF', '').startswith('refs/tags/'):
version += '.' + commit
return version
raise RuntimeError("Unable to find version string.")


if __name__ == "__main__":
setup(name=os.getenv('CAMB_PACKAGE_NAME', 'camb'),
version=find_version(),
zip_safe=False,
cmdclass={'build_py': SharedLibrary, 'build_cluster': SharedLibraryCluster,
'make': MakeLibrary, 'make_cluster': MakeLibraryCluster, 'clean': CleanLibrary,
Expand Down

0 comments on commit db70d1f

Please sign in to comment.