Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: python setup.py bdist_wheel
- run: python setup.py bdist_wheel --python-tag=py3
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import re
import time
import sys

from setuptools import find_packages
from setuptools import setup
Expand Down Expand Up @@ -33,6 +34,10 @@
with open(os.path.join(here, 'brainpy', '__init__.py'), 'r') as f:
init_py = f.read()
version = re.search('__version__ = "(.*)"', init_py).groups()[0]
if len(sys.argv) > 2 and sys.argv[2] == '--python-tag=py3':
version = version
else:
version += '.post{}'.format(time.strftime("%Y%m%d", time.localtime()))

# obtain long description from README
with io.open(os.path.join(here, 'README.md'), 'r', encoding='utf-8') as f:
Expand All @@ -44,7 +49,7 @@
# setup
setup(
name='brainpy',
version=version + '.post{}'.format(time.strftime("%Y%m%d", time.localtime())),
version=version,
description='BrainPy: Brain Dynamics Programming in Python',
long_description=README,
long_description_content_type="text/markdown",
Expand Down